3d460521679eb945cb4aec52928f0db6020ebe0c
[egate.git] / kernel / Makefile
1 # Makefile for Email gateway CCL
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.12  1995/03/27 08:23:57  adam
6 # First use of gip interface and gw-db.
7 # First work on eti program.
8 #
9 # Revision 1.11  1995/03/03  17:19:09  adam
10 # Smarter presentation. Bug fix in email header interpretation.
11 #
12 # Revision 1.10  1995/03/01  14:32:24  adam
13 # Better diagnostics. Default is, that only one database selected when
14 # several are known.
15 #
16 # Revision 1.9  1995/02/23  08:32:14  adam
17 # Changed header.
18 #
19 # Revision 1.7  1995/02/22  08:51:34  adam
20 # Output function can be customized in fml, which is used to print
21 # the reply to reply_fd.
22 #
23 # Revision 1.6  1995/02/21  14:00:08  adam
24 # Minor changes.
25 #
26 # Revision 1.5  1995/02/21  12:11:59  adam
27 # Diagnostic record with error info. observed.
28 #
29 # Revision 1.4  1995/02/20  21:16:16  adam
30 # FML support. Bug fixes. Profile for drewdb.
31 #
32 # Revision 1.3  1995/02/17  09:08:35  adam
33 # Reply with subject. CCL base command implemented.
34 #
35 # Revision 1.2  1995/02/16  18:35:07  adam
36 # First use of Zdist library. Search requests are supported.
37 # Present requests are not supported yet.
38 #
39 # Revision 1.1  1995/02/15  17:45:29  adam
40 # First version of email gateway kernel. Email requests are read
41 # from stdin. The output is transferred to an MTA if 'From' is
42 # found in the header - or stdout if absent. No Z39.50 client is used.
43 #
44 #
45 SHELL=/bin/sh
46
47 ZPRE=/home/proj/zdist/zdist102b1-1/libz3950
48 ZINC=-I$(ZPRE)
49 ZLIB=$(ZPRE)/libz3950.a
50
51 INCLUDE=-I../include
52 CFLAGS=-g -Wall 
53 CPP=$(CC) -E
54 DEFS=$(INCLUDE) -DUSE_FML=1
55 USELIBS1=../lib/ccl.a ../lib/fml.a ../lib/libzass.a ../lib/libres+log.a \
56 ../lib/util.a $(ZLIB) $(REGEXOBJ)
57
58 PROG1=kernel
59 O1=main.o urp.o ttyemit.o
60
61 PROG2=eti
62 O2=eti.o
63
64 all: $(PROG1) $(PROG2)
65
66 $(PROG1): $(O1) $(USELIBS1)
67         $(CC) $(CFLAGS) -o $(PROG1) $(O1) $(USELIBS1) $(NETLIB)
68
69 $(PROG2): $(O2) $(USELIBS1)
70         $(CC) $(CFLAGS) -o $(PROG2) $(O2) $(USELIBS1) $(NETLIB)
71
72 .c.o:
73         $(CC) -c $(DEFS) $(CFLAGS) $<
74
75 clean:
76         rm -f *.log *.[oa] $(PROG1) $(PROG2) 
77         rm -f core mon.out gmon.out errlist *~ fifo.* 
78
79 depend: depend2
80
81 depend1:
82         mv Makefile Makefile.tmp
83         sed '/^#Depend/q' <Makefile.tmp >Makefile
84         $(CPP) $(INCLUDE) -M *.c >>Makefile
85         -rm Makefile.tmp
86
87 depend2:
88         $(CPP) $(INCLUDE) -M *.c >.depend       
89
90 ifeq (.depend,$(wildcard .depend))
91 include .depend
92 endif
93
94 #Depend --- DOT NOT DELETE THIS LINE