1 # Makefile for www gateway utility
4 # $Id: Makefile,v 1.35 1996/03/07 13:18:52 adam Exp $
8 ZLIB=../../yaz/lib/libyaz.a
9 ZINC=-I../../yaz/include
12 IRTCLLIB=$(IRTCLDIR)/libirtcl.a
13 IRTCLINC=-I$(IRTCLDIR)
15 #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
16 #NETLIB=-lnsl -lsocket
18 OLIB=../lib/util.a ../lib/libres+log.a
19 TCLLIB=/usr/local/lib/libtcl7.5.a
22 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
23 mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw sameas.egw
24 HSCRIPTS=egwindex.html
25 CONFFILES=egw.res ztargets.conf
31 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o wshmain.o
33 P4=wproto.o winterp.o waissh.o wtcl.o wirtcl.o wshmain.o wwaistcl.o
36 HTTPDDIR=/usr/local/etc/httpd
37 CGIDIR=$(HTTPDDIR)/cgi-bin
38 HTDOCS=$(HTTPDDIR)/htdocs
39 EGWDIR=$(HTTPDDIR)/egw
40 LOGDIR=$(HTTPDDIR)/logs
41 GIFDIR=$(HTDOCS)/egwgif
43 #HTTPDDIR=/usr/local/www
44 #CGIDIR=/usr/local/www/cgi-bin
45 #HTDOCS=/data2/html/egw/html
46 #EGWDIR=/data2/html/egw/scripts
47 #LOGDIR=/data2/html/egw/logs
48 #GIFDIR=/data2/html/egw/gif
50 INCLUDE=-I../include $(ZINC) $(TCLINC) $(IRTCLINC)
51 DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\"
53 all: $(TPROG1) $(TPROG2)
55 $(TPROG1): $(P1) $(OLIB)
56 $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB)
58 $(TPROG2): $(P2) $(OLIB)
59 $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \
60 $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
62 $(TPROG3): $(P3) $(OLIB)
63 $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB)
66 WAISDIR=../../freeWAIS-sf-2.0
67 WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a
69 $(TPROG4): $(P4) $(OLIB)
70 $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \
72 $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
74 install: install.prog install.script install.gif
76 install.prog: $(TPROG1) $(TPROG2)
77 @if [ ! -d $(CGIDIR) ]; then \
78 echo "Making directory $(CGIDIR)"; \
81 @if [ ! -d $(EGWDIR) ]; then \
82 echo "Making directory $(EGWDIR)"; \
85 @for x in $(TPROG1); do \
86 echo Installing $$x; \
88 chmod a+x $(CGIDIR)/$$x; \
90 for x in $(TPROG2); do \
91 echo Installing $$x; \
93 chmod a+x $(EGWDIR)/$$x; \
95 for p in egwtcl egwirtcl egwhtml; do \
96 rm -f $(EGWDIR)/$$p; \
97 ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
99 @if [ -x $(TPROG4) ]; then \
100 echo Installing $(TPROG4); \
101 cp $(TPROG4) $(EGWDIR)/$(TPROG4); \
102 chmod a+x $(EGWDIR)/$(TPROG4); \
106 @if [ ! -d $(EGWDIR) ]; then \
107 echo "Making directory $(EGWDIR)"; \
110 @if [ ! -d $(HTDOCS) ]; then \
111 echo "Making directory $(HTDOCS)"; \
114 @for x in $(WSCRIPTS); do \
115 echo Installing $$x; \
116 cp $$x $(EGWDIR)/$$x; \
118 @for x in $(HSCRIPTS); do \
119 echo Installing $$x; \
122 @for x in $(CONFFILES); do \
123 echo Installing $$x; \
128 @if [ ! -d $(GIFDIR) ]; then \
129 echo "Making directory $(GIFDIR)"; \
132 @for x in gif/*.gif; do \
133 echo Installing $$x; \
138 $(CC) -c $(DEFS) $(CFLAGS) $<
141 rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
142 rm -f core mon.out gmon.out errlist *~
147 sed '/^#Depend/q' <Makefile >Makefile.tmp
148 $(CPP) $(DEFS) -M *.c >>Makefile.tmp
149 mv -f Makefile.tmp Makefile
152 $(CPP) $(DEFS) -M *.c >.depend
154 #GNU make style depend
155 ifeq (.depend,$(wildcard .depend))
159 #Depend --- DOT NOT DELETE THIS LINE