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