Minor changes.
[egate.git] / res+log / Makefile
1 # Makefile for resource management/logging facilities.
2 # Europagate, 1994-1995.
3 #
4 # Makefile,v
5 # Revision 1.2  1995/02/22  08:51:44  adam
6 # Definition of CPP changed.
7 #
8 # Revision 1.1.1.1  1995/02/09  17:27:11  adam
9 # Initial version of email gateway under CVS control.
10 #
11 SHELL=/bin/sh
12 INCLUDE=-I../include
13 CFLAGS=-Wall -pedantic -ansi
14 CPP=$(CC) -E
15 TPROG1=gw-log-test
16 TPROG2=gw-res-test
17 LIB=../lib/libres+log.a
18 PO=gw-log.o gw-res.o
19 DEFS=$(INCLUDE)
20
21 all: $(TPROG1) $(TPROG2)
22
23 $(TPROG1): $(TPROG1).o $(LIB) 
24         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB)
25
26 $(TPROG2): $(TPROG2).o $(LIB) 
27         $(CC) $(CFLAGS) -o $(TPROG2) $(TPROG2).o $(LIB) 
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