Use pid of exited child to close fifos.
[egate.git] / kernel / Makefile
1 # Makefile for Email gateway CCL
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.22  1995/05/01 12:43:26  adam
6 # First work on resource monitor program.
7 #
8 # Revision 1.21  1995/04/20  16:10:45  adam
9 # Modified to work with non-blocking zass-api. Not using non-blocking
10 # facility yet.
11 #
12 # Revision 1.20  1995/04/20  15:24:59  quinn
13 # *** empty log message ***
14 #
15 # Revision 1.19  1995/04/19  16:08:20  adam
16 # Minor changes.
17 #
18 # Revision 1.18  1995/04/19  16:01:57  adam
19 # Some hacks to get the FIFO communication work!! Isn't reliable.
20 # Resource gw.account added - default account info.
21 #
22 # Revision 1.17  1995/04/19  10:46:17  adam
23 # Persistency works much better now. New command: status - history-like
24 #
25 # Revision 1.16  1995/04/19  07:30:56  adam
26 # First work on Z39.50 persistence.
27 #
28 # Revision 1.15  1995/04/17  11:27:29  quinn
29 # Smallish
30 #
31 # Revision 1.14  1995/04/17  09:34:23  adam
32 # Timeout (idletime) adjustable. Minor changes in kernel.
33 #
34 # Revision 1.13  1995/03/27  12:51:04  adam
35 # New log level in use: GW_LOG_ERRNO.
36 #
37 # Revision 1.12  1995/03/27  08:23:57  adam
38 # First use of gip interface and gw-db.
39 # First work on eti program.
40 #
41 # Revision 1.11  1995/03/03  17:19:09  adam
42 # Smarter presentation. Bug fix in email header interpretation.
43 #
44 # Revision 1.10  1995/03/01  14:32:24  adam
45 # Better diagnostics. Default is, that only one database selected when
46 # several are known.
47 #
48 # Revision 1.9  1995/02/23  08:32:14  adam
49 # Changed header.
50 #
51 # Revision 1.7  1995/02/22  08:51:34  adam
52 # Output function can be customized in fml, which is used to print
53 # the reply to reply_fd.
54 #
55 # Revision 1.6  1995/02/21  14:00:08  adam
56 # Minor changes.
57 #
58 # Revision 1.5  1995/02/21  12:11:59  adam
59 # Diagnostic record with error info. observed.
60 #
61 # Revision 1.4  1995/02/20  21:16:16  adam
62 # FML support. Bug fixes. Profile for drewdb.
63 #
64 # Revision 1.3  1995/02/17  09:08:35  adam
65 # Reply with subject. CCL base command implemented.
66 #
67 # Revision 1.2  1995/02/16  18:35:07  adam
68 # First use of Zdist library. Search requests are supported.
69 # Present requests are not supported yet.
70 #
71 # Revision 1.1  1995/02/15  17:45:29  adam
72 # First version of email gateway kernel. Email requests are read
73 # from stdin. The output is transferred to an MTA if 'From' is
74 # found in the header - or stdout if absent. No Z39.50 client is used.
75 #
76 #
77 SHELL=/bin/sh
78
79 #ZPRE=/home/proj/zdist/zdist102b1-1/libz3950
80 #ZINC=-I$(ZPRE)
81 #ZLIB=$(ZPRE)/libz3950.a
82
83 ZLIB=../../yaz/lib/libyaz.a
84
85 INCLUDE=-I../include
86 #CFLAGS=-g -Wall 
87 CPP=$(CC) -E
88 DEFS=$(INCLUDE) -DUSE_FML=1 -DUSE_MONITOR=1
89
90 PROG1=kernel
91 O1=main.o urp.o persist.o
92 USELIBS1=../lib/ccl.a ../lib/fml.a ../lib/libzass.a ../lib/libres+log.a \
93 ../lib/util.a $(ZLIB) $(REGEXOBJ)
94
95 PROG2=eti
96 O2=eti.o
97 USELIBS2=../lib/libres+log.a ../lib/util.a 
98
99 PROG3=monitor
100 O3=monitor.o
101 USELIBS3=../lib/libres+log.a ../lib/util.a 
102
103 all: $(PROG1) $(PROG2) $(PROG3)
104
105 $(PROG1): $(O1) $(USELIBS1)
106         $(CC) $(CFLAGS) -o $(PROG1) $(O1) $(USELIBS1) $(NETLIB)
107
108 $(PROG2): $(O2) $(USELIBS2)
109         $(CC) $(CFLAGS) -o $(PROG2) $(O2) $(USELIBS2) $(NETLIB)
110
111 $(PROG3): $(O3) $(USELIBS3)
112         $(CC) $(CFLAGS) -o $(PROG3) $(O3) $(USELIBS3) $(NETLIB)
113
114 .c.o:
115         $(CC) -c $(DEFS) $(CFLAGS) $<
116
117 clean:
118         rm -f *.log *.[oa] $(PROG1) $(PROG2) 
119         rm -f core mon.out gmon.out errlist *~ fifo.* 
120
121 depend: depend2
122
123 depend1:
124         sed '/^#Depend/q' <Makefile >Makefile.tmp
125         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
126         mv -f Makefile.tmp Makefile
127
128 depend2:
129         $(CPP) $(DEFS) -M *.c >.depend  
130
131 #GNU make style depend
132 ifeq (.depend,$(wildcard .depend))
133 include .depend
134 endif
135
136 #Depend --- DOT NOT DELETE THIS LINE