Temporary remove of ccl entry.
[egate.git] / www / Makefile
1 # Makefile for www gateway utility
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.17  1995/11/14 16:31:35  adam
6 # Temporary remove of ccl entry.
7 #
8 # Revision 1.16  1995/11/14  16:01:50  adam
9 # Bug fix: didn't use correct database(s) when 'all' checkbox was selected.
10 #
11 # Revision 1.15  1995/11/13  18:17:46  adam
12 # Better error handling.
13 #
14 # Revision 1.14  1995/11/13  15:41:40  adam
15 # Arrow gifs.
16 # Gateway uses record element set names B(rief) and F(ull).
17 # Bug fix. Didn't save idAuthentication correctly.
18 #
19 # Revision 1.13  1995/11/08  18:07:22  adam
20 # Minor changes.
21 #
22 # Revision 1.12  1995/11/08  16:14:32  adam
23 # Many improvements and bug fixes.
24 # First version that ran on dtbsun.
25 #
26 # Revision 1.11  1995/11/07  14:56:58  adam
27 # Work on search in multiple targets.
28 # New wtcl command: wlog.
29 # Optional timeout parameter to zwait.
30 #
31 # Revision 1.10  1995/11/07  10:44:29  adam
32 # Work on search in multiple targets.
33 #
34 # Revision 1.9  1995/11/06  17:44:20  adam
35 # State reestablised when shell restarts. History of previous
36 # result sets.
37 #
38 # Revision 1.8  1995/11/06  10:51:14  adam
39 # End of response marker in response from wsh/wproto to wcgi.
40 # Shells are respawned when necessary.
41 #
42 # Revision 1.7  1995/10/31  16:56:23  adam
43 # Record presentation.
44 #
45 # Revision 1.6  1995/10/27  17:30:15  adam
46 # First search request/response that works.
47 #
48 # Revision 1.5  1995/10/27  15:12:02  adam
49 # IrTcl incorporated in the gateway.
50 # Better separation of script types.
51 # Z39.50 gateway scripts entered.
52 #
53 # Revision 1.4  1995/10/23  17:04:16  adam
54 # Added some initial z39 gateway scripts.
55 #
56 # Revision 1.3  1995/10/23  16:55:33  adam
57 # A lot of changes - really.
58 #
59 # Revision 1.2  1995/10/20  14:02:40  adam
60 # First version of WWW gateway with embedded Tcl.
61 #
62 # Revision 1.1  1995/10/20  11:49:24  adam
63 # First version of www gateway.
64 #
65 SHELL=/bin/sh
66 #
67 ZDEFS=
68 ZINC=-I../../yaz/include
69 ZLIB=../../yaz/lib/libyaz.a
70 MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
71 LIBIRTCL=/usr/local/lib/libirtcl.a $(ZLIB) $(MOSILIB)
72 #NETLIB=-lnsl -lsocket
73 #
74 OLIB=../lib/util.a ../lib/libres+log.a 
75 TCLLIB=/usr/local/lib/libtcl7.4.a
76 #
77 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
78  mtargets.egw mquery.egw msearch.egw
79 HSCRIPTS=egwindex.html
80 CONFFILES=ztargets.conf
81 GIFFILES=webgate.gif darrw.gif uarrw.gif noway.gif
82 TPROG1=egwcgi
83 TPROG2=egwsh
84 TPROG3=wtest
85 P1=wcgi.o
86 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o
87 P3=wproto.o wtest.o
88 CPP=$(CC) -E
89 #
90 INCLUDE=-I../include $(ZINC)
91 DEFS=$(INCLUDE) $(ZDEFS)
92
93 HTTPDDIR=/usr/local/etc/httpd
94 CGIBIN=$(HTTPDDIR)/cgi-bin
95 HTDOCS=$(HTTPDDIR)/htdocs
96 CONFDIR=$(HTTPDDIR)/conf
97 GIFDIR=$(HTDOCS)/gif
98
99 all: $(TPROG1) $(TPROG2)
100
101 $(TPROG1): $(P1)
102         $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB)
103
104 $(TPROG2): $(P2)
105         $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) \
106                 $(NETLIB) $(TCLLIB) -lm
107
108 $(TPROG3): $(P3)
109         $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB)
110
111 install: install.prog install.script
112
113 install.prog: $(TPROG1) $(TPROG2)
114         @for x in $(TPROG1) $(TPROG2); do \
115                 echo Installing $$x; \
116                 cp $$x $(CGIBIN); \
117                 chmod +x $(CGIBIN)/$$x; \
118         done; \
119         for p in egwtcl egwirtcl egwhtml; do \
120                 rm -f $(CGIBIN)/$$p; \
121                 ln $(CGIBIN)/$(TPROG2) $(CGIBIN)/$$p; \
122         done
123
124 install.script:
125         @for x in $(WSCRIPTS); do \
126                 echo Installing $$x; \
127                 cp $$x $(CGIBIN); \
128         done
129         @for x in $(HSCRIPTS); do \
130                 echo Installing $$x; \
131                 cp $$x $(HTDOCS); \
132         done
133         @for x in $(CONFFILES); do \
134                 echo Installing $$x; \
135                 cp $$x $(CONFDIR); \
136         done
137         @for x in $(GIFFILES); do \
138                 echo Installing $$x; \
139                 cp $$x $(GIFDIR); \
140         done
141
142 .c.o:
143         $(CC) -c $(DEFS) $(CFLAGS) $<
144
145 clean:
146         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3) 
147         rm -f core mon.out gmon.out errlist *~
148
149 depend: depend2
150
151 depend1:
152         sed '/^#Depend/q' <Makefile >Makefile.tmp
153         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
154         mv -f Makefile.tmp Makefile
155
156 depend2:
157         $(CPP) $(DEFS) -M *.c >.depend  
158
159 #GNU make style depend
160 ifeq (.depend,$(wildcard .depend))
161 include .depend
162 endif
163
164 #Depend --- DOT NOT DELETE THIS LINE