9f0107f2b4b581fcaaea77fd1879db120b332d77
[openafs.git] / src / cmd / Makefile
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 # */
9
10 SHELL = /bin/sh
11 COMPONENT=cmd
12 include ../config/Makefile.${SYS_NAME}
13
14 COMPILE_ET = ${SRCDIR}bin/compile_et
15
16 INCLS=cmd.h ${XINCLS}
17 LIBOBJS=cmd_errors.o cmd.o 
18 LIB64OBJS=cmd_errors64.o cmd64.o 
19
20 CFLAGS= ${OPTMZ} -I${TOP_SRCDIR}/config -I${SRCDIR}include ${XCFLAGS}
21
22 include ../config/Makefile.version
23
24 system install noversion: install.noversion
25
26 all: libcmd.a
27
28 test tests: 
29         (cd test; $(MAKE) )
30
31 cmd.h cmd_errors.c: cmd_errors.et cmd.p.h
32         rm -f cmd.h cmd_errors.c; ${COMPILE_ET} cmd_errors -h cmd
33
34 cmd_errors.o: cmd_errors.c
35
36 cmd.o: cmd.c ${INCLS}
37
38 AFS_component_version_number64.o: AFS_component_version_number.c
39         ${CC} ${OPTMZ} -I${SRCDIR}include ${XCFLAGS64} -c -o AFS_component_version_number64.o AFS_component_version_number.c
40
41 cmd_errors64.o: cmd_errors.c
42         ${CC} ${OPTMZ} -I${TOP_SRCDIR}/config -I${SRCDIR}include ${XCFLAGS64} -c -o cmd_errors64.o cmd_errors.c
43
44 cmd64.o: cmd.c ${INCLS}
45         ${CC} ${OPTMZ} -I${TOP_SRCDIR}/config -I${SRCDIR}include ${XCFLAGS64} -c -o cmd64.o cmd.c
46
47
48 libcmd64.a: ${LIB64OBJS} AFS_component_version_number64.o
49         -rm -f libcmd64.a
50         $(AR) r libcmd64.a ${LIB64OBJS} AFS_component_version_number64.o
51         $(RANLIB) libcmd64.a
52
53 libcmd.a: ${LIBOBJS} AFS_component_version_number.o
54         -rm -f libcmd.a
55         $(AR) r libcmd.a ${LIBOBJS} AFS_component_version_number.o
56         $(RANLIB) libcmd.a
57
58 kinstall:
59         @echo No kernel source here.
60
61 ukinstall webinstall: install
62
63 install64: libcmd64.a
64         ${INSTALL} libcmd64.a  ${DESTDIR}lib/afs/libcmd64.a
65         ${INSTALL} cmd.h ${DESTDIR}include/afs/cmd.h
66
67 install.noversion: all
68         ${INSTALL} libcmd.a ${DESTDIR}lib/afs/libcmd.a
69         ${INSTALL} cmd.h ${DESTDIR}include/afs/cmd.h
70
71 clean:
72         rm -f  *.a *.o ctest dtest cmd.h cmd_errors.c core AFS_component_version_number.c
73