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