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