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