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