Pristine Ack-5.5
[Ack-5.5.git] / mach / proto / top / proto.make
1 # $Id: proto.make,v 1.3 1994/06/24 13:28:53 ceriel Exp $
2
3 #PARAMS         do not remove this line!
4
5 #MACH_DEFINE    do not remove this or the next line!
6 MACH = 
7
8 SRC_DIR = $(SRC_HOME)/mach/$(MACH)/top
9 LIBS=$(TARGET_HOME)/modules/lib/libstring.$(LIBSUF)
10 PREFLAGS=-I. -DNDEBUG
11 PFLAGS=
12 CFLAGS=$(PREFLAGS) $(PFLAGS) $(COPTIONS)
13 LDFLAGS=$(PFLAGS) $(LDOPTIONS)
14 LINTFLAGS=$(PREFLAGS) $(LINTOPTIONS)
15 CDIR=$(SRC_HOME)/mach/proto/top
16 CFILES=$(CDIR)/top.c $(CDIR)/queue.c
17 OFILES=top.$(SUF) queue.$(SUF)
18
19 all:    gen.c
20         make top
21
22 top:    $(OFILES)
23         $(CC) $(LDFLAGS) $(OFILES)  $(LIBS) -o top
24
25 top.$(SUF):     $(CDIR)/top.c gen.c
26         $(CC) -c $(CFLAGS) $(CDIR)/top.c
27
28 queue.$(SUF): $(CDIR)/queue.c
29         $(CC) -c $(CFLAGS) $(CDIR)/queue.c
30
31 install: all
32         -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
33         cp top $(TARGET_HOME)/lib.bin/$(MACH)/top
34
35 cmp:     all
36         -cmp top $(TARGET_HOME)/lib.bin/$(MACH)/top
37
38 gen.c: $(SRC_DIR)/table
39         $(UTIL_HOME)/lib.bin/topgen $(SRC_DIR)/table
40
41 lint: $(CFILES) gen.c
42         $(LINT) $(LINTFLAGS) $(CFILES)
43
44 clean:
45         rm -f *.$(SUF) gen.c gen.h top
46
47 top.$(SUF):             gen.h
48 top.$(SUF):             $(CDIR)/top.h
49 top.$(SUF):             $(CDIR)/queue.h
50 queue.$(SUF):   $(CDIR)/queue.h