Work on search in multiple targets.
[egate.git] / www / Makefile
1 # Makefile for www gateway utility
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.10  1995/11/07 10:44:29  adam
6 # Work on search in multiple targets.
7 #
8 # Revision 1.9  1995/11/06  17:44:20  adam
9 # State reestablised when shell restarts. History of previous
10 # result sets.
11 #
12 # Revision 1.8  1995/11/06  10:51:14  adam
13 # End of response marker in response from wsh/wproto to wcgi.
14 # Shells are respawned when necessary.
15 #
16 # Revision 1.7  1995/10/31  16:56:23  adam
17 # Record presentation.
18 #
19 # Revision 1.6  1995/10/27  17:30:15  adam
20 # First search request/response that works.
21 #
22 # Revision 1.5  1995/10/27  15:12:02  adam
23 # IrTcl incorporated in the gateway.
24 # Better separation of script types.
25 # Z39.50 gateway scripts entered.
26 #
27 # Revision 1.4  1995/10/23  17:04:16  adam
28 # Added some initial z39 gateway scripts.
29 #
30 # Revision 1.3  1995/10/23  16:55:33  adam
31 # A lot of changes - really.
32 #
33 # Revision 1.2  1995/10/20  14:02:40  adam
34 # First version of WWW gateway with embedded Tcl.
35 #
36 # Revision 1.1  1995/10/20  11:49:24  adam
37 # First version of www gateway.
38 #
39 SHELL=/bin/sh
40 #
41 ZDEFS=
42 ZINC=-I../../yaz/include
43 ZLIB=../../yaz/lib/libyaz.a
44 MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
45 LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB)
46 #
47 OLIB=../lib/util.a ../lib/libres+log.a 
48 TCLLIB=/usr/local/lib/libtcl7.4.a
49 #
50 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
51  mtargets.egw
52 HSCRIPTS=egwindex.html
53 CONFFILES=ztargets.conf
54 GIFFILES=webgate.gif
55 TPROG1=egwcgi
56 TPROG2=egwsh
57 TPROG3=wtest
58 P1=wcgi.o
59 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o
60 P3=wproto.o wtest.o
61 CPP=$(CC) -E
62 #
63 INCLUDE=-I../include $(ZINC)
64 DEFS=$(INCLUDE) $(ZDEFS)
65
66 HTTPDDIR=/usr/local/etc/httpd
67 CGIBIN=$(HTTPDDIR)/cgi-bin
68 HTDOCS=$(HTTPDDIR)/htdocs
69 CONFDIR=$(HTTPDDIR)/conf
70 GIFDIR=$(HTDOCS)/gif
71
72 all: $(TPROG1) $(TPROG2)
73
74 $(TPROG1): $(P1)
75         $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB)
76
77 $(TPROG2): $(P2)
78         $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) $(TCLLIB) -lm
79
80 $(TPROG3): $(P3)
81         $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB)
82
83 install: install.prog install.script
84
85 install.prog: $(TPROG1) $(TPROG2)
86         @for x in $(TPROG1) $(TPROG2); do \
87                 echo Installing $$x; \
88                 cp $$x $(CGIBIN); \
89                 chmod +x $(CGIBIN)/$$x; \
90         done; \
91         ln -f $(CGIBIN)/$(TPROG2) $(CGIBIN)/egwtcl; \
92         ln -f $(CGIBIN)/$(TPROG2) $(CGIBIN)/egwirtcl; \
93         ln -f $(CGIBIN)/$(TPROG2) $(CGIBIN)/egwhtml
94
95 install.script:
96         @for x in $(WSCRIPTS); do \
97                 echo Installing $$x; \
98                 cp $$x $(CGIBIN); \
99         done
100         @for x in $(HSCRIPTS); do \
101                 echo Installing $$x; \
102                 cp $$x $(HTDOCS); \
103         done
104         @for x in $(CONFFILES); do \
105                 echo Installing $$x; \
106                 cp $$x $(CONFDIR); \
107         done
108         @for x in $(GIFFILES); do \
109                 echo Installing $$x; \
110                 cp $$x $(GIFDIR); \
111         done
112
113 .c.o:
114         $(CC) -c $(DEFS) $(CFLAGS) $<
115
116 clean:
117         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3) 
118         rm -f core mon.out gmon.out errlist *~
119
120 depend: depend2
121
122 depend1:
123         sed '/^#Depend/q' <Makefile >Makefile.tmp
124         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
125         mv -f Makefile.tmp Makefile
126
127 depend2:
128         $(CPP) $(DEFS) -M *.c >.depend  
129
130 #GNU make style depend
131 ifeq (.depend,$(wildcard .depend))
132 include .depend
133 endif
134
135 #Depend --- DOT NOT DELETE THIS LINE