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