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