1 # Makefile for www gateway utility
4 # $Id: Makefile,v 1.25 1996/01/24 14:14:18 adam Exp $
9 ZINC=-I../../yaz/include
10 ZLIB=../../yaz/lib/libyaz.a
11 MOSILIB=../../xtimosi/src/libmosi.a -lrfc
12 LIBIRTCL=../../ir-tcl/libirtcl.a $(ZLIB) $(MOSILIB)
13 #NETLIB=-lnsl -lsocket
15 OLIB=../lib/util.a ../lib/libres+log.a
16 TCLLIB=/usr/local/lib/libtcl7.4.a
17 TCLINC=-I/usr/local/include
19 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
20 mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw
21 HSCRIPTS=egwindex.html
22 CONFFILES=ztargets.conf
27 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o
31 HTTPDDIR=/usr/local/etc/httpd
32 CGIDIR=$(HTTPDDIR)/cgi-bin
33 HTDOCS=$(HTTPDDIR)/htdocs
34 EGWDIR=$(HTTPDDIR)/egw
35 LOGDIR=$(HTTPDDIR)/logs
36 GIFDIR=$(HTDOCS)/egwgif
38 #HTTPDDIR=/usr/local/www
39 #CGIDIR=/usr/local/www/cgi-bin
40 #HTDOCS=/data2/html/egw/html
41 #EGWDIR=/data2/html/egw/scripts
42 #LOGDIR=/data2/html/egw/logs
43 #GIFDIR=/data2/html/egw/gif
45 INCLUDE=-I../include $(ZINC) $(TCLINC)
46 DEFS=$(INCLUDE) $(ZDEFS) -DCGIDIR=\"$(CGIDIR)\" -DEGWDIR=\"$(EGWDIR)\" \
47 -DLOGDIR=\"$(LOGDIR)\"
49 all: $(TPROG1) $(TPROG2)
52 $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB) $(ZLIB)
55 $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(LIBIRTCL) \
56 $(NETLIB) $(TCLLIB) -lm
59 $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ZLIB)
61 install: install.prog install.script
63 install.prog: $(TPROG1) $(TPROG2)
64 @for x in $(TPROG1) $(TPROG2); do \
65 echo Installing $$x; \
67 chmod a+x $(CGIDIR)/$$x; \
69 for p in egwtcl egwirtcl egwhtml; do \
70 rm -f $(CGIDIR)/$$p; \
71 ln $(CGIDIR)/$(TPROG2) $(CGIDIR)/$$p; \
75 @if [ ! -d $(EGWDIR) ]; then \
76 echo "Making directory $(EGWDIR)"; \
79 @for x in $(WSCRIPTS); do \
80 echo Installing $$x; \
81 cp $$x $(EGWDIR)/$$x; \
83 @for x in $(HSCRIPTS); do \
84 echo Installing $$x; \
87 @for x in $(CONFFILES); do \
88 echo Installing $$x; \
91 @if [ ! -d $(GIFDIR) ]; then \
92 echo "Making directory $(GIFDIR)"; \
95 @for x in gif/*.gif; do \
96 echo Installing $$x; \
101 $(CC) -c $(DEFS) $(CFLAGS) $<
104 rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
105 rm -f core mon.out gmon.out errlist *~
110 sed '/^#Depend/q' <Makefile >Makefile.tmp
111 $(CPP) $(DEFS) -M *.c >>Makefile.tmp
112 mv -f Makefile.tmp Makefile
115 $(CPP) $(DEFS) -M *.c >.depend
117 #GNU make style depend
118 ifeq (.depend,$(wildcard .depend))
122 #Depend --- DOT NOT DELETE THIS LINE