b16b34daddda99f8f101515078dada42fd833971
[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
11 INCLUDES=-I/usr/include -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}
12 DBGFLAG  = -UDEBUG
13 CFLAGS   = ${DBUG} -DKFLAG -DANDREW -DVICE $(DBGFLAG) $(INCLUDES) $(XCFLAGS)
14 YFLAGS   = -vd
15 #LFLAGS  = -ll
16
17 HFILES = package.h \
18          validupdates.h \
19          systype.h \
20          globals.h
21
22 SRCS = package.c \
23         conftree.c \
24         check.c \
25         update.c \
26         fileops.c \
27         messages.c \
28         misc.c \
29         globfuncs.c
30
31 TEST_SRCS = test.c \
32         conftree.c \
33         messages.c \
34         misc.c \
35         globfuncs.c
36
37 OTHERSRCS = gram.y
38
39 OBJS =  package.o \
40         gram.o \
41         lex.o \
42         conftree.o \
43         check.o \
44         update.o \
45         fileops.o \
46         messages.o \
47         misc.o \
48         globfuncs.o
49
50 TEST_OBJS = test.o \
51         test_gram.o \
52         lex.o \
53         conftree.o \
54         messages.o \
55         misc.o \
56         globfuncs.o
57
58 LIBS=${TOP_LIBDIR}/libsys.a \
59         ${TOP_LIBDIR}/libcmd.a \
60         ${TOP_LIBDIR}/libcom_err.a \
61         ${TOP_LIBDIR}/librx.a \
62         ${TOP_LIBDIR}/libsys.a \
63         ${TOP_LIBDIR}/util.a \
64         ${TOP_LIBDIR}/liblwp.a \
65         ${XLIBS}
66
67 include ../config/Makefile.version
68
69 all     : package package_test
70
71 package : $(OBJS)
72         $(CC) $(CFLAGS) -o $@ $(OBJS) $(NON_SHARED) ${LIBS}
73
74 package_test : $(TEST_OBJS)
75         $(CC) $(CFLAGS) -o package_test $(TEST_OBJS) ${LIBS}
76
77 package.o: package.c AFS_component_version_number.o
78 test.o: test.c AFS_component_version_number.o
79
80 lex.c:
81         -$(RM) -f lex.c
82         $(LEX)  -t lex.l > lex.c
83
84 clean   :
85         $(RM) -f *.o gram.c test_gram.c core package package_test *.BAK y.output yacc.tmp yacc.acts\
86         AFS_component_version_number.c lex.c y.tab.h
87
88 install:   ${DESTDIR}${sbindir}/package ${DESTDIR}${sbindir}/package_test ${DESTDIR}${sbindir}/makepkgfiles
89
90
91 ${DEST}/etc/package: package
92         ${INSTALL} $? $@
93
94 ${DESTDIR}${sbindir}/package: package
95         ${INSTALL} $? $@
96
97 ${DEST}/etc/package_test: package_test
98         ${INSTALL} $? $@
99
100 ${DESTDIR}${sbindir}/package_test: package_test
101         ${INSTALL} $? $@
102
103 ${DEST}/etc/makepkgfiles: makepkgfiles
104         ${INSTALL} $? $@
105
106 ${DESTDIR}${sbindir}/makepkgfiles: makepkgfiles
107         ${INSTALL} $? $@
108
109
110 dest:   ${DEST}/etc/package ${DEST}/etc/package_test ${DEST}/etc/makepkgfiles
111