1 # Copyright 2000, International Business Machines Corporation and others.
4 # This software has been released under the terms of the IBM Public
5 # License. For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11 include @TOP_OBJDIR@/src/config/Makefile.libtool
13 LT_objs=cmd_errors.lo cmd.lo config_file.lo AFS_component_version_number.lo
14 LT_deps=$(top_builddir)/src/comerr/liboafs_comerr.la
17 LIB64OBJS=cmd_errors64.o cmd64.o
19 all: ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libcmd_pic.a \
20 ${TOP_INCDIR}/afs/cmd.h liboafs_cmd.la
22 all64: all ${TOP_LIBDIR}/libcmd64.a
24 generated: cmd.h cmd_errors.c
26 ${TOP_LIBDIR}/libcmd.a: libcmd.a
29 ${TOP_LIBDIR}/libcmd_pic.a: libcmd_pic.la
30 $(INSTALL_DATA) .libs/libcmd_pic.a $@
32 ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
35 ${TOP_INCDIR}/afs/cmd.h: cmd.h
38 cmd.h: cmd_errors.et cmd.p.h
39 $(RM) -f cmd.h cmd_errors.c
40 ${COMPILE_ET} -p ${srcdir} cmd_errors -h cmd
45 config_file.lo: $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c krb5_locl.h
46 $(LT_CCRULE) $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c
48 cmd_errors64.o: cmd_errors.c
49 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
50 -c -o cmd_errors64.o cmd_errors.c
53 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
54 -c -o cmd64.o ${srcdir}/cmd.c
56 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
58 $(AR) crv $@ ${LIB64OBJS} AFS_component_version_number64.o
62 $(LT_LDLIB_static) $(LT_objs)
64 libcmd_pic.la: $(LT_objs)
65 $(LT_LDLIB_pic) $(LT_objs)
67 liboafs_cmd.la: $(LT_objs) $(LT_deps)
68 $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
70 AFS_component_version_number64.o: AFS_component_version_number.c
71 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
72 -c -o AFS_component_version_number64.o \
73 AFS_component_version_number.c
78 install: libcmd.a cmd.h
79 ${INSTALL} -d ${DESTDIR}${libdir}/afs
80 ${INSTALL} -d ${DESTDIR}${includedir}/afs
81 ${INSTALL_DATA} libcmd.a ${DESTDIR}$(libdir)/afs/libcmd.a
82 ${INSTALL_DATA} cmd.h ${DESTDIR}${includedir}/afs/cmd.h
84 install64: install libcmd64.a
85 ${INSTALL_DATA} libcmd64.a ${DESTDIR}${libdir}/afs/libcmd64.a
88 ${INSTALL} -d ${DEST}/lib/afs
89 ${INSTALL} -d ${DEST}/include/afs
90 ${INSTALL_DATA} libcmd.a ${DEST}/lib/afs/libcmd.a
91 ${INSTALL_DATA} cmd.h ${DEST}/include/afs/cmd.h
93 dest64: dest libcmd64.a
94 ${INSTALL_DATA} libcmd64.a ${DEST}/lib/afs/libcmd64.a
104 $(RM) -f *.a *.o ctest dtest cmd.h cmd_errors.c core \
105 AFS_component_version_number.c
107 include ../config/Makefile.version