comerr: Fix a couple of libtool problems
[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.lwp
11
12
13 LIBOBJS=cmd_errors.o cmd.o config_file.o
14 LIBPICOBJS=cmd_errors_pic.o cmd_pic.o config_file_pic.o
15 LIB64OBJS=cmd_errors64.o cmd64.o 
16
17 all: ${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libcmd_pic.a ${TOP_INCDIR}/afs/cmd.h
18
19 all64: all ${TOP_LIBDIR}/libcmd64.a
20
21 generated: cmd.h cmd_errors.c
22
23 ${TOP_LIBDIR}/libcmd.a: libcmd.a
24         ${INSTALL_DATA} $? $@
25
26 ${TOP_LIBDIR}/libcmd_pic.a: libcmd_pic.a
27         ${INSTALL_DATA} $? $@
28
29 ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
30         ${INSTALL_DATA} $? $@
31
32 ${TOP_INCDIR}/afs/cmd.h: cmd.h
33         ${INSTALL_DATA} $? $@
34
35 cmd.h: cmd_errors.et cmd.p.h
36         $(RM) -f cmd.h cmd_errors.c
37         ${COMPILE_ET} -p ${srcdir} cmd_errors -h cmd
38
39 cmd_errors.c: cmd.h 
40
41 cmd_errors.o: cmd_errors.c
42
43 cmd.o: cmd.c cmd.h
44
45 config_file.o: $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c krb5_locl.h
46         $(AFS_CCRULE) -c $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c
47
48 cmd_errors64.o: cmd_errors.c
49         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
50                 -c -o cmd_errors64.o cmd_errors.c
51
52 cmd64.o: cmd.c cmd.h
53         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
54                 -c -o cmd64.o ${srcdir}/cmd.c
55
56 cmd_errors_pic.o: cmd_errors.c
57         $(SHD_CCRULE) cmd_errors.c
58
59 cmd_pic.o: cmd.c cmd.h
60         $(SHD_CCRULE) ${srcdir}/cmd.c
61
62 config_file_pic.o: $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c krb5_locl.h
63         $(SHD_CCRULE) $(TOP_SRCDIR)/external/heimdal/krb5/config_file.c
64
65 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
66         -$(RM) -f $@
67         $(AR) crv $@ ${LIB64OBJS} AFS_component_version_number64.o
68         $(RANLIB) $@
69
70 libcmd.a: ${LIBOBJS} AFS_component_version_number.o
71         -$(RM) -f $@
72         $(AR) crv $@ ${LIBOBJS} AFS_component_version_number.o
73         $(RANLIB) $@
74
75 libcmd_pic.a: ${LIBPICOBJS} AFS_component_version_number_pic.o
76         -$(RM) -f $@
77         $(AR) crv $@ ${LIBPICOBJS} AFS_component_version_number_pic.o
78         $(RANLIB) $@
79
80 AFS_component_version_number64.o: AFS_component_version_number.c
81         ${CC} $(COMMON_CFLAGS) $(CPPFLAGS) ${XCFLAGS64} \
82                 -c -o AFS_component_version_number64.o \
83                 AFS_component_version_number.c
84
85 AFS_component_version_number_pic.o: AFS_component_version_number.c
86         $(SHD_CCRULE) AFS_component_version_number.c
87
88 #
89 # Install targets
90 #
91 install: libcmd.a libcmd_pic.a cmd.h
92         ${INSTALL} -d ${DESTDIR}${libdir}/afs
93         ${INSTALL} -d ${DESTDIR}${includedir}/afs
94         ${INSTALL_DATA} libcmd.a ${DESTDIR}${libdir}/afs/libcmd.a
95         ${INSTALL_DATA} libcmd_pic.a ${DESTDIR}${libdir}/afs/libcmd_pic.a
96         ${INSTALL_DATA} cmd.h ${DESTDIR}${includedir}/afs/cmd.h
97
98 install64: install libcmd64.a
99         ${INSTALL_DATA} libcmd64.a ${DESTDIR}${libdir}/afs/libcmd64.a
100
101 dest: libcmd.a cmd.h libcmd_pic.a
102         ${INSTALL} -d ${DEST}/lib/afs
103         ${INSTALL} -d ${DEST}/include/afs
104         ${INSTALL_DATA} libcmd.a ${DEST}/lib/afs/libcmd.a
105         ${INSTALL_DATA} cmd.h ${DEST}/include/afs/cmd.h
106         ${INSTALL_DATA} libcmd_pic.a ${DEST}/lib/afs/libcmd_pic.a
107
108 dest64: dest libcmd64.a
109         ${INSTALL_DATA} libcmd64.a ${DEST}/lib/afs/libcmd64.a
110
111 #
112 # Misc targets
113 #
114 test tests: 
115         (cd test; $(MAKE) )
116
117 clean:
118         $(RM) -f  *.a *.o ctest dtest cmd.h cmd_errors.c core AFS_component_version_number.c
119
120 include ../config/Makefile.version