1 # Makefile for www gateway utility
4 # $Id: Makefile,v 1.31 1996/02/20 16:07:39 adam Exp $
9 #ZINC=-I../../yaz/include
10 ZLIB=../../yaz/lib/libyaz.a
12 #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
13 LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB)
14 #NETLIB=-lnsl -lsocket
16 OLIB=../lib/util.a ../lib/libres+log.a
17 TCLLIB=/usr/local/lib/libtcl7.5.a
20 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
21 mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw
22 HSCRIPTS=egwindex.html
23 CONFFILES=egw.res ztargets.conf
28 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o
32 HTTPDDIR=/usr/local/etc/httpd
33 CGIDIR=$(HTTPDDIR)/cgi-bin
34 HTDOCS=$(HTTPDDIR)/htdocs
35 EGWDIR=$(HTTPDDIR)/egw
36 LOGDIR=$(HTTPDDIR)/logs
37 GIFDIR=$(HTDOCS)/egwgif
39 #HTTPDDIR=/usr/local/www
40 #CGIDIR=/usr/local/www/cgi-bin
41 #HTDOCS=/data2/html/egw/html
42 #EGWDIR=/data2/html/egw/scripts
43 #LOGDIR=/data2/html/egw/logs
44 #GIFDIR=/data2/html/egw/gif
46 INCLUDE=-I../include $(ZINC) $(TCLINC)
47 DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\"
49 all: $(TPROG1) $(TPROG2)
51 $(TPROG1): $(P1) $(OLIB)
52 $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB) $(ZLIB)
54 $(TPROG2): $(P2) $(OLIB)
55 $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) \
56 $(NETLIB) $(TCLLIB) -lm
58 $(TPROG3): $(P3) $(OLIB)
59 $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ZLIB)
61 install: install.prog install.script install.gif
63 install.prog: $(TPROG1) $(TPROG2)
64 @if [ ! -d $(CGIDIR) ]; then \
65 echo "Making directory $(CGIDIR)"; \
68 @if [ ! -d $(EGWDIR) ]; then \
69 echo "Making directory $(EGWDIR)"; \
72 @for x in $(TPROG1); do \
73 echo Installing $$x; \
75 chmod a+x $(CGIDIR)/$$x; \
77 for x in $(TPROG2); do \
78 echo Installing $$x; \
80 chmod a+x $(EGWDIR)/$$x; \
82 for p in egwtcl egwirtcl egwhtml; do \
83 rm -f $(EGWDIR)/$$p; \
84 ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
88 @if [ ! -d $(EGWDIR) ]; then \
89 echo "Making directory $(EGWDIR)"; \
92 @if [ ! -d $(HTDOCS) ]; then \
93 echo "Making directory $(HTDOCS)"; \
96 @for x in $(WSCRIPTS); do \
97 echo Installing $$x; \
98 cp $$x $(EGWDIR)/$$x; \
100 @for x in $(HSCRIPTS); do \
101 echo Installing $$x; \
104 @for x in $(CONFFILES); do \
105 echo Installing $$x; \
110 @if [ ! -d $(GIFDIR) ]; then \
111 echo "Making directory $(GIFDIR)"; \
114 @for x in gif/*.gif; do \
115 echo Installing $$x; \
120 $(CC) -c $(DEFS) $(CFLAGS) $<
123 rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
124 rm -f core mon.out gmon.out errlist *~
129 sed '/^#Depend/q' <Makefile >Makefile.tmp
130 $(CPP) $(DEFS) -M *.c >>Makefile.tmp
131 mv -f Makefile.tmp Makefile
134 $(CPP) $(DEFS) -M *.c >.depend
136 #GNU make style depend
137 ifeq (.depend,$(wildcard .depend))
141 #Depend --- DOT NOT DELETE THIS LINE