Definition of CPP changed.
[egate.git] / ccl / Makefile
1 # Makefile for Email gateway CCL
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.4  1995/02/22 08:50:28  adam
6 # Definition of CPP changed.
7 #
8 # Revision 1.3  1995/02/14  10:25:55  adam
9 # The constructions 'qualifier rel term ...' implemented.
10 #
11 # Revision 1.2  1995/02/13  15:15:06  adam
12 # Added handling of qualifiers. Not finished yet.
13 #
14 # Revision 1.1  1995/02/13  12:35:20  adam
15 # First version of CCL. Qualifiers aren't handled yet.
16 #
17 SHELL=/bin/sh
18 INCLUDE=-I../include
19 CFLAGS=-g -Wall -pedantic -ansi
20 TPROG1=cclsh
21 LIB=../lib/ccl.a
22 PO=cclfind.o ccltoken.o cclerrms.o cclqual.o cclptree.o
23 CPP=$(CC) -E
24 DEFS=$(INCLUDE)
25
26 all: $(TPROG1)
27
28 $(TPROG1): $(TPROG1).o $(LIB) ../lib/util.a
29         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB) ../lib/util.a
30
31 $(LIB): $(PO)
32         rm -f $(LIB)
33         ar qc $(LIB) $(PO)
34         ranlib $(LIB)
35
36 .c.o:
37         $(CC) -c $(DEFS) $(CFLAGS) $<
38
39 clean:
40         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
41
42 depend: depend2
43
44 depend1:
45         mv Makefile Makefile.tmp
46         sed '/^#Depend/q' <Makefile.tmp >Makefile
47         $(CPP) $(INCLUDE) -M *.c >>Makefile
48         -rm Makefile.tmp
49
50 depend2:
51         $(CPP) $(INCLUDE) -M *.c >.depend       
52
53 ifeq (.depend,$(wildcard .depend))
54 include .depend
55 endif
56
57 #Depend --- DOT NOT DELETE THIS LINE