Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / cmd / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3 #
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
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.pthread
11 include @TOP_OBJDIR@/src/config/Makefile.libtool
12
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
15 LT_libs=
16
17 LIB64OBJS=cmd_errors64.o cmd64.o
18
19 all: ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libcmd_pic.a \
20 ${TOP_INCDIR}/afs/cmd.h liboafs_cmd.la
21
22 all64: all ${TOP_LIBDIR}/libcmd64.a
23
24 generated: cmd.h cmd_errors.c
25
26 ${TOP_LIBDIR}/libcmd.a: libcmd.a
27 ${INSTALL_DATA} $? $@
28
29 ${TOP_LIBDIR}/libcmd_pic.a: libcmd_pic.la
30 $(INSTALL_DATA) .libs/libcmd_pic.a $@
31
32 ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
33 ${INSTALL_DATA} $? $@
34
35 ${TOP_INCDIR}/afs/cmd.h: cmd.h
36 ${INSTALL_DATA} $? $@
37
38 cmd_errors.c: cmd_errors.et
39 ${COMPILE_ET_C} -p ${srcdir} cmd_errors
40
41 cmd.h: cmd_errors.et cmd.p.h
42 ${COMPILE_ET_H} -p ${srcdir} cmd_errors -h cmd
43
44 cmd.lo: cmd.h
45 config_file.lo: cmd.h
46
47 config_file.lo: $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c krb5_locl.h
48 $(LT_CCRULE) $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c
49
50 cmd_errors64.o: cmd_errors.c
51 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
52 -c -o cmd_errors64.o cmd_errors.c
53
54 cmd64.o: cmd.c cmd.h
55 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
56 -c -o cmd64.o ${srcdir}/cmd.c
57
58 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
59 -$(RM) -f $@
60 $(AR) crv $@ ${LIB64OBJS} AFS_component_version_number64.o
61 $(RANLIB) $@
62
63 libcmd.a: $(LT_objs)
64 $(LT_LDLIB_static) $(LT_objs)
65
66 libcmd_pic.la: $(LT_objs)
67 $(LT_LDLIB_pic) $(LT_objs)
68
69 liboafs_cmd.la: $(LT_objs) $(LT_deps)
70 $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs)
71
72 AFS_component_version_number64.o: AFS_component_version_number.c
73 ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
74 -c -o AFS_component_version_number64.o \
75 AFS_component_version_number.c
76
77 #
78 # Install targets
79 #
80 install: libcmd.a cmd.h
81 ${INSTALL} -d ${DESTDIR}${libdir}/afs
82 ${INSTALL} -d ${DESTDIR}${includedir}/afs
83 ${INSTALL_DATA} libcmd.a ${DESTDIR}$(libdir)/afs/libcmd.a
84 ${INSTALL_DATA} cmd.h ${DESTDIR}${includedir}/afs/cmd.h
85
86 install64: install libcmd64.a
87 ${INSTALL_DATA} libcmd64.a ${DESTDIR}${libdir}/afs/libcmd64.a
88
89 dest: libcmd.a cmd.h
90 ${INSTALL} -d ${DEST}/lib/afs
91 ${INSTALL} -d ${DEST}/include/afs
92 ${INSTALL_DATA} libcmd.a ${DEST}/lib/afs/libcmd.a
93 ${INSTALL_DATA} cmd.h ${DEST}/include/afs/cmd.h
94
95 dest64: dest libcmd64.a
96 ${INSTALL_DATA} libcmd64.a ${DEST}/lib/afs/libcmd64.a
97
98 #
99 # Misc targets
100 #
101 test tests:
102 (cd test; $(MAKE) )
103
104 clean:
105 $(LT_CLEAN)
106 $(RM) -f *.a *.o ctest dtest cmd.h cmd_errors.c core \
107 AFS_component_version_number.c
108
109 include ../config/Makefile.version