death-to-pinstall-20060801
[openafs.git] / src / package / 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 # Makefile for package, the AFS workstation configuration tool.
9 #
10 srcdir=@srcdir@
11 include @TOP_OBJDIR@/src/config/Makefile.config
12
13 CFLAGS   = ${COMMON_CFLAGS} -DKFLAG -DANDREW -DVICE -UDEBUG
14
15 OBJS =  package.o \
16         gram.o \
17         lex.o \
18         conftree.o \
19         check.o \
20         update.o \
21         fileops.o \
22         messages.o \
23         misc.o \
24         globfuncs.o
25
26 TEST_OBJS = test.o \
27         test_gram.o \
28         lex.o \
29         conftree.o \
30         messages.o \
31         misc.o \
32         globfuncs.o
33
34 LIBS=${TOP_LIBDIR}/libsys.a \
35         ${TOP_LIBDIR}/libcmd.a \
36         ${TOP_LIBDIR}/libcom_err.a \
37         ${TOP_LIBDIR}/librx.a \
38         ${TOP_LIBDIR}/libsys.a \
39         ${TOP_LIBDIR}/util.a \
40         ${TOP_LIBDIR}/liblwp.a \
41         ${XLIBS}
42
43 include ../config/Makefile.version
44
45 all     : package package_test
46
47 package : $(OBJS)
48         $(CC) $(CFLAGS) -o $@ $(OBJS) $(NON_SHARED) ${LIBS}
49
50 package_test : $(TEST_OBJS)
51         $(CC) $(CFLAGS) -o package_test $(TEST_OBJS) ${LIBS}
52
53 package.o: package.c AFS_component_version_number.o
54 test.o: test.c AFS_component_version_number.o
55
56 lex.c:
57         -$(RM) -f lex.c
58         $(LEX)  -t lex.l > lex.c
59
60 clean   :
61         $(RM) -f *.o gram.c test_gram.c core package package_test *.BAK y.output yacc.tmp yacc.acts\
62         AFS_component_version_number.c lex.c y.tab.h
63
64 install: package package_test makepkgfiles
65         ${INSTALL} -d ${DESTDIR}${sbindir}
66         ${INSTALL_PROGRAM} package ${DESTDIR}${sbindir}/package
67         ${INSTALL_PROGRAM} package_test ${DESTDIR}${sbindir}/package_test
68         ${INSTALL_PROGRAM} makepkgfiles ${DESTDIR}${sbindir}/makepkgfiles
69
70 dest: package package_test makepkgfiles
71         ${INSTALL} -d ${DEST}/etc
72         ${INSTALL_PROGRAM} package ${DEST}/etc/package
73         ${INSTALL_PROGRAM} package_test ${DEST}/etc/package_test
74         ${INSTALL_PROGRAM} makepkgfiles ${DEST}/etc/makepkgfiles