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