77598b1deb03fa4e9e1eafb70a7502d71b1fd6ae
[egate.git] / res+log / Makefile
1 # Makefile for resource management/logging facilities.
2 # Europagate, 1994-1995.
3 #
4 # $Log: Makefile,v $
5 # Revision 1.4  1995/02/23 08:32:20  adam
6 # Changed header.
7 #
8 # Revision 1.2  1995/02/22  08:51:44  adam
9 # Definition of CPP changed.
10 #
11 # Revision 1.1.1.1  1995/02/09  17:27:11  adam
12 # Initial version of email gateway under CVS control.
13 #
14 SHELL=/bin/sh
15 INCLUDE=-I../include
16 CFLAGS=-Wall -pedantic -ansi
17 CPP=$(CC) -E
18 TPROG1=gw-log-test
19 TPROG2=gw-res-test
20 LIB=../lib/libres+log.a
21 PO=gw-log.o gw-res.o
22 DEFS=$(INCLUDE)
23
24 all: $(TPROG1) $(TPROG2)
25
26 $(TPROG1): $(TPROG1).o $(LIB) 
27         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB)
28
29 $(TPROG2): $(TPROG2).o $(LIB) 
30         $(CC) $(CFLAGS) -o $(TPROG2) $(TPROG2).o $(LIB) 
31
32 $(LIB): $(PO)
33         rm -f $(LIB)
34         ar qc $(LIB) $(PO)
35         ranlib $(LIB)
36
37 .c.o:
38         $(CC) -c $(DEFS) $(CFLAGS) $<
39
40 clean:
41         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
42
43 depend: depend2
44
45 depend1:
46         mv Makefile Makefile.tmp
47         sed '/^#Depend/q' <Makefile.tmp >Makefile
48         $(CPP) $(INCLUDE) -M *.c >>Makefile
49         -rm Makefile.tmp
50
51 depend2:
52         $(CPP) $(INCLUDE) -M *.c >.depend       
53
54 ifeq (.depend,$(wildcard .depend))
55 include .depend
56 endif
57
58 #Depend --- DOT NOT DELETE THIS LINE