1 # Makefile for www gateway utility
4 # $Id: Makefile,v 1.32 1996/02/29 15:41:38 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) $(OLIB) $(IRTCLLIB) \
70 $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm
72 install: install.prog install.script install.gif
74 install.prog: $(TPROG1) $(TPROG2)
75 @if [ ! -d $(CGIDIR) ]; then \
76 echo "Making directory $(CGIDIR)"; \
79 @if [ ! -d $(EGWDIR) ]; then \
80 echo "Making directory $(EGWDIR)"; \
83 @for x in $(TPROG1); do \
84 echo Installing $$x; \
86 chmod a+x $(CGIDIR)/$$x; \
88 for x in $(TPROG2); do \
89 echo Installing $$x; \
91 chmod a+x $(EGWDIR)/$$x; \
93 for p in egwtcl egwirtcl egwhtml; do \
94 rm -f $(EGWDIR)/$$p; \
95 ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \
99 @if [ ! -d $(EGWDIR) ]; then \
100 echo "Making directory $(EGWDIR)"; \
103 @if [ ! -d $(HTDOCS) ]; then \
104 echo "Making directory $(HTDOCS)"; \
107 @for x in $(WSCRIPTS); do \
108 echo Installing $$x; \
109 cp $$x $(EGWDIR)/$$x; \
111 @for x in $(HSCRIPTS); do \
112 echo Installing $$x; \
115 @for x in $(CONFFILES); do \
116 echo Installing $$x; \
121 @if [ ! -d $(GIFDIR) ]; then \
122 echo "Making directory $(GIFDIR)"; \
125 @for x in gif/*.gif; do \
126 echo Installing $$x; \
131 $(CC) -c $(DEFS) $(CFLAGS) $<
134 rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
135 rm -f core mon.out gmon.out errlist *~
140 sed '/^#Depend/q' <Makefile >Makefile.tmp
141 $(CPP) $(DEFS) -M *.c >>Makefile.tmp
142 mv -f Makefile.tmp Makefile
145 $(CPP) $(DEFS) -M *.c >.depend
147 #GNU make style depend
148 ifeq (.depend,$(wildcard .depend))
152 #Depend --- DOT NOT DELETE THIS LINE