503b8152ccc7cb44baca85238bab41f8c4db1d23
[openafs.git] / src / package / Makefile.in
1 # (C) Copyright Transarc Corporation 1989
2 # Licensed Materials - Property of Transarc
3 # All Rights Reserved
4 #
5 # Makefile for package, the AFS workstation configuration tool.
6 #
7 srcdir=@srcdir@
8 include @TOP_OBJDIR@/src/config/Makefile.config
9
10 CFLAGS   = ${COMMON_CFLAGS} -DKFLAG -DANDREW -DVICE -UDEBUG
11
12 OBJS =  package.o \
13         gram.o \
14         lex.o \
15         conftree.o \
16         check.o \
17         update.o \
18         fileops.o \
19         messages.o \
20         misc.o \
21         globfuncs.o
22
23 TEST_OBJS = test.o \
24         test_gram.o \
25         lex.o \
26         conftree.o \
27         messages.o \
28         misc.o \
29         globfuncs.o
30
31 LIBS=${TOP_LIBDIR}/libsys.a \
32         ${TOP_LIBDIR}/libcmd.a \
33         ${TOP_LIBDIR}/libcom_err.a \
34         ${TOP_LIBDIR}/librx.a \
35         ${TOP_LIBDIR}/libsys.a \
36         ${TOP_LIBDIR}/util.a \
37         ${TOP_LIBDIR}/liblwp.a \
38         ${XLIBS}
39
40 include ../config/Makefile.version
41
42 all     : package package_test
43
44 package : $(OBJS)
45         $(CC) $(CFLAGS) -o $@ $(OBJS) $(NON_SHARED) ${LIBS}
46
47 package_test : $(TEST_OBJS)
48         $(CC) $(CFLAGS) -o package_test $(TEST_OBJS) ${LIBS}
49
50 package.o: package.c AFS_component_version_number.o
51 test.o: test.c AFS_component_version_number.o
52
53 lex.c:
54         -$(RM) -f lex.c
55         $(LEX)  -t lex.l > lex.c
56
57 clean   :
58         $(RM) -f *.o gram.c test_gram.c core package package_test *.BAK y.output yacc.tmp yacc.acts\
59         AFS_component_version_number.c lex.c y.tab.h
60
61 install:   ${DESTDIR}${sbindir}/package ${DESTDIR}${sbindir}/package_test ${DESTDIR}${sbindir}/makepkgfiles
62
63
64 ${DEST}/etc/package: package
65         ${INSTALL} $? $@
66
67 ${DESTDIR}${sbindir}/package: package
68         ${INSTALL} $? $@
69
70 ${DEST}/etc/package_test: package_test
71         ${INSTALL} $? $@
72
73 ${DESTDIR}${sbindir}/package_test: package_test
74         ${INSTALL} $? $@
75
76 ${DEST}/etc/makepkgfiles: makepkgfiles
77         ${INSTALL} $? $@
78
79 ${DESTDIR}${sbindir}/makepkgfiles: makepkgfiles
80         ${INSTALL} $? $@
81
82
83 dest:   ${DEST}/etc/package ${DEST}/etc/package_test ${DEST}/etc/makepkgfiles
84