Minor changes.
[egate.git] / zlayer / Makefile
1 # Makefile for Email gateway utilities
2 # Europagate, 1995
3 #
4 # Makefile,v
5 # Revision 1.3  1995/02/22  08:51:49  adam
6 # Definition of CPP changed.
7 #
8 # Revision 1.2  1995/02/16  15:01:38  quinn
9 # Polished some library-references
10 #
11 # Revision 1.1  1995/02/16  14:47:55  quinn
12 # First kick.
13 #
14 #
15
16 ZPRE=/home/proj/zdist/zdist102b1-1/libz3950
17 ZINC=-I$(ZPRE)
18 ZLIB=$(ZPRE)/libz3950.a
19
20 SHELL=/bin/sh
21 INCLUDE=-I. -I../include $(ZINC)
22 CFLAGS=-g -Wall -pedantic -ansi
23 TPROG1=test
24 LIB=../lib/libzass.a
25 PO=zaccess.o
26 CPP=$(CC) -E
27 DEFS=$(INCLUDE)
28 ZDEFS=-DHIGH_TO_LOW -Dfar=
29
30 all: $(LIB)
31
32 $(TPROG1): $(TPROG1).o $(LIB) 
33         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB) $(ZLIB) ../lib/libres+log.a
34
35 $(LIB): $(PO)
36         rm -f $(LIB)
37         ar qc $(LIB) $(PO)
38         ranlib $(LIB)
39
40 .c.o:
41         $(CC) -c $(DEFS) $(CFLAGS) $(ZDEFS) $<
42
43 clean:
44         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
45
46 depend: depend2
47
48 depend1:
49         mv Makefile Makefile.tmp
50         sed '/^#Depend/q' <Makefile.tmp >Makefile
51         $(CPP) $(INCLUDE) -M *.c >>Makefile
52         -rm Makefile.tmp
53
54 depend2:
55         $(CPP) $(INCLUDE) -M *.c >.depend       
56
57 ifeq (.depend,$(wildcard .depend))
58 include .depend
59 endif
60
61 #Depend --- DOT NOT DELETE THIS LINE