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