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