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