death-to-pinstall-20060801
[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
11 LIBOBJS=cmd_errors.o cmd.o 
12 LIB64OBJS=cmd_errors64.o cmd64.o 
13
14 all: ${TOP_LIBDIR}/libcmd.a ${TOP_INCDIR}/afs/cmd.h
15
16 all64: all ${TOP_LIBDIR}/libcmd64.a
17
18 ${TOP_LIBDIR}/libcmd.a: libcmd.a
19         ${INSTALL_DATA} $? $@
20
21 ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
22         ${INSTALL_DATA} $? $@
23
24 ${TOP_INCDIR}/afs/cmd.h: cmd.h
25         ${INSTALL_DATA} $? $@
26
27 cmd.h: cmd_errors.et cmd.p.h
28         $(RM) -f cmd.h cmd_errors.c
29         ${COMPILE_ET} -p ${srcdir} cmd_errors -h cmd
30
31 cmd_errors.c: cmd.h 
32
33 cmd_errors.o: cmd_errors.c
34
35 cmd.o: cmd.c cmd.h
36
37 cmd_errors64.o: cmd_errors.c
38         ${CC} ${OPTMZ} -I. -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS64} -c -o cmd_errors64.o cmd_errors.c
39
40 cmd64.o: cmd.c cmd.h
41         ${CC} ${OPTMZ} -I. -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS64} -c -o cmd64.o ${srcdir}/cmd.c
42
43 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
44         -$(RM) -f $@
45         $(AR) crv $@ ${LIB64OBJS} AFS_component_version_number64.o
46         $(RANLIB) $@
47
48 libcmd.a: ${LIBOBJS} AFS_component_version_number.o
49         -$(RM) -f $@
50         $(AR) crv $@ ${LIBOBJS} AFS_component_version_number.o
51         $(RANLIB) $@
52
53 AFS_component_version_number64.o: AFS_component_version_number.c
54         ${CC} ${OPTMZ} -I${TOP_INCDIR} ${XCFLAGS64} -c -o AFS_component_version_number64.o AFS_component_version_number.c
55
56 #
57 # Install targets
58 #
59 install: libcmd.a cmd.h
60         ${INSTALL} -d ${DESTDIR}${libdir}/afs
61         ${INSTALL} -d ${DESTDIR}${includedir}/afs
62         ${INSTALL_DATA} libcmd.a ${DESTDIR}${libdir}/afs/libcmd.a
63         ${INSTALL_DATA} cmd.h ${DESTDIR}${includedir}/afs/cmd.h
64
65 install64: install libcmd64.a
66         ${INSTALL_DATA} libcmd64.a ${DESTDIR}${libdir}/afs/libcmd64.a
67
68 dest: libcmd.a cmd.h
69         ${INSTALL} -d ${DEST}/lib/afs
70         ${INSTALL} -d ${DEST}/include/afs
71         ${INSTALL_DATA} libcmd.a ${DEST}/lib/afs/libcmd.a
72         ${INSTALL_DATA} cmd.h ${DEST}/include/afs/cmd.h
73
74 dest64: dest libcmd64.a
75         ${INSTALL_DATA} libcmd64.a ${DEST}/lib/afs/libcmd64.a
76
77 #
78 # Misc targets
79 #
80 test tests: 
81         (cd test; $(MAKE) )
82
83 clean:
84         $(RM) -f  *.a *.o ctest dtest cmd.h cmd_errors.c core AFS_component_version_number.c
85
86 include ../config/Makefile.version