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