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