1 # Makefile for www gateway utility
4 # $Id: Makefile,v 1.33 1996/03/05 18:50:24 adam Exp $
8 ZLIB=../../yaz/lib/libyaz.a
11 IRTCLLIB=$(IRTCLDIR)/libirtcl.a
12 IRTCLINC=-I$(IRTCLDIR)
14 #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
15 #NETLIB=-lnsl -lsocket
17 OLIB=../lib/util.a ../lib/libres+log.a
18 TCLLIB=/usr/local/lib/libtcl7.5.a
21 WSCRIPTS=egwscript targets.egw query.egw search.egw showfull.egw z39util.tcl \
22 mtargets.egw mquery.egw msearch.egw history.egw tform.egw tdefine.egw
23 HSCRIPTS=egwindex.html
24 CONFFILES=egw.res ztargets.conf
30 P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o wshmain.o
32 P4=wproto.o winterp.o waissh.o wtcl.o wirtcl.o wshmain.o wwaistcl.o
35 HTTPDDIR=/usr/local/etc/httpd
36 CGIDIR=$(HTTPDDIR)/cgi-bin
37 HTDOCS=$(HTTPDDIR)/htdocs
38 EGWDIR=$(HTTPDDIR)/egw
39 LOGDIR=$(HTTPDDIR)/logs
40 GIFDIR=$(HTDOCS)/egwgif
42 #HTTPDDIR=/usr/local/www
43 #CGIDIR=/usr/local/www/cgi-bin
44 #HTDOCS=/data2/html/egw/html
45 #EGWDIR=/data2/html/egw/scripts
46 #LOGDIR=/data2/html/egw/logs
47 #GIFDIR=/data2/html/egw/gif
49 INCLUDE=-I../include $(TCLINC) $(IRTCLINC)
50 DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\"
52 all: $(TPROG1) $(TPROG2)
54 $(TPROG1): $(P1) $(OLIB)
55 $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB)
57 $(TPROG2): $(P2) $(OLIB)
58 $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \
59 $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
61 $(TPROG3): $(P3) $(OLIB)
62 $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB)
65 WAISDIR=../../freeWAIS-sf-2.0
66 WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a
68 $(TPROG4): $(P4) $(OLIB)
69 $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \
71 $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
73 install: install.prog install.script install.gif
75 install.prog: $(TPROG1) $(TPROG2)
76 @if [ ! -d $(CGIDIR) ]; then \
77 echo "Making directory $(CGIDIR)"; \
80 @if [ ! -d $(EGWDIR) ]; then \
81 echo "Making directory $(EGWDIR)"; \
84 @for x in $(TPROG1); do \
85 echo Installing $$x; \
87 chmod a+x $(CGIDIR)/$$x; \
89 for x in $(TPROG2); do \
90 echo Installing $$x; \
92 chmod a+x $(EGWDIR)/$$x; \
94 for p in egwtcl egwirtcl egwhtml; do \
95 rm -f $(EGWDIR)/$$p; \
96 ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
98 @if [ -x $(TPROG4) ]; then \
99 echo Installing $(TPROG4); \
100 cp $(TPROG4) $(EGWDIR)/$(TPROG4); \
101 chmod a+x $(EGWDIR)/$(TPROG4); \
105 @if [ ! -d $(EGWDIR) ]; then \
106 echo "Making directory $(EGWDIR)"; \
109 @if [ ! -d $(HTDOCS) ]; then \
110 echo "Making directory $(HTDOCS)"; \
113 @for x in $(WSCRIPTS); do \
114 echo Installing $$x; \
115 cp $$x $(EGWDIR)/$$x; \
117 @for x in $(HSCRIPTS); do \
118 echo Installing $$x; \
121 @for x in $(CONFFILES); do \
122 echo Installing $$x; \
127 @if [ ! -d $(GIFDIR) ]; then \
128 echo "Making directory $(GIFDIR)"; \
131 @for x in gif/*.gif; do \
132 echo Installing $$x; \
137 $(CC) -c $(DEFS) $(CFLAGS) $<
140 rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
141 rm -f core mon.out gmon.out errlist *~
146 sed '/^#Depend/q' <Makefile >Makefile.tmp
147 $(CPP) $(DEFS) -M *.c >>Makefile.tmp
148 mv -f Makefile.tmp Makefile
151 $(CPP) $(DEFS) -M *.c >.depend
153 #GNU make style depend
154 ifeq (.depend,$(wildcard .depend))
158 #Depend --- DOT NOT DELETE THIS LINE