Pristine Ack-5.5
[Ack-5.5.git] / util / cgg / proto.make
1 # $Id: proto.make,v 1.4 1994/06/24 10:16:11 ceriel Exp $
2
3 #PARAMS         do not remove this line!
4
5 SRC_DIR = $(SRC_HOME)/util/cgg
6 INCLUDES=-I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(SRC_DIR) -I.
7 CFLAGS=$(INCLUDES) $(COPTIONS)
8 LDFLAGS=$(LDOPTIONS)
9 LINTFLAGS=$(INCLUDES) $(LINTOPTIONS)
10 LIBS=$(TARGET_HOME)/lib.bin/em_data.$(LIBSUF)
11
12 cgg:    bootgram.$(SUF) main.$(SUF) bootlex.$(SUF)
13         $(CC) $(LDFLAGS) bootgram.$(SUF) main.$(SUF) bootlex.$(SUF) $(LIBS) -o cgg
14
15 bootgram.c:     $(SRC_DIR)/bootgram.y
16         @echo expect 1 shift/reduce conflict
17         yacc -d $(SRC_DIR)/bootgram.y
18         mv y.tab.c bootgram.c
19
20 install:        cgg
21         cp cgg $(TARGET_HOME)/lib.bin/cgg
22
23 cmp:            cgg
24         -cmp cgg $(TARGET_HOME)/lib.bin/cgg
25
26 bootlex.c:      $(SRC_DIR)/bootlex.l
27         flex -st $(SRC_DIR)/bootlex.l > bootlex.c
28
29 lint:   bootgram.c $(SRC_DIR)/main.c bootlex.c
30         $(LINT) $(LINTFLAGS) bootgram.c $(SRC_DIR)/main.c bootlex.c $(UTIL_HOME)/lib.bin/$(LINTPREF)em_data.$(LINTSUF)
31 clean:
32         rm -f *.$(SUF) bootgram.c bootlex.c cgg y.tab.h
33
34 bootgram.$(SUF):        bootgram.c
35                 $(CC) -c $(CFLAGS) bootgram.c
36 bootgram.$(SUF):        $(SRC_DIR)/booth.h
37 bootgram.$(SUF):        $(TARGET_HOME)/h/cg_pattern.h
38 bootlex.$(SUF): bootlex.c
39                 $(CC) -c $(CFLAGS) bootlex.c
40 bootlex.$(SUF): $(SRC_DIR)/booth.h
41 bootlex.$(SUF): $(TARGET_HOME)/h/cg_pattern.h
42 main.$(SUF):    $(SRC_DIR)/main.c
43                 $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
44 main.$(SUF):    $(SRC_DIR)/booth.h
45 main.$(SUF):    $(TARGET_HOME)//h/cg_pattern.h