# Makefile for www gateway utility # Europagate, 1995 # # $Id: Makefile,v 1.39 1996/05/15 18:43:37 adam Exp $ # SHELL=/bin/sh ZLIB=../../yaz/lib/libyaz.a ZINC=-I../../yaz/include IRTCLDIR=../../ir-tcl IRTCLLIB=$(IRTCLDIR)/libirtcl.a IRTCLINC=-I$(IRTCLDIR) #MOSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a #NETLIB=-lnsl -lsocket OLIB=../lib/util.a ../lib/libres+log.a TCLLIB=/usr/local/lib/libtcl7.5.a TCLINC= HSCRIPTS=egwindex.html CONFFILES=egw.res ztargets.conf TPROG1=egwcgi TPROG2=egwsh TPROG3=wtest TPROG4=egwwais P1=wcgi.o P2=wproto.o winterp.o wsh.o wtcl.o whtml.o wirtcl.o wshmain.o P3=wproto.o wtest.o P4=wproto.o winterp.o waissh.o wtcl.o wirtcl.o wshmain.o wwaistcl.o CPP=$(CC) -E HTTPDDIR=/usr/local/etc/httpd CGIDIR=$(HTTPDDIR)/cgi-bin HTDOCS=$(HTTPDDIR)/htdocs EGWDIR=$(HTTPDDIR)/egw GIFDIR=$(HTDOCS)/egwgif #HTTPDDIR=/usr/local/www #CGIDIR=/usr/local/www/cgi-bin #HTDOCS=/data2/html/egw/html #EGWDIR=/data2/html/egw/scripts #GIFDIR=/data2/html/egw/gif INCLUDE=-I../include $(ZINC) $(TCLINC) $(IRTCLINC) DEFS=$(INCLUDE) $(ZDEFS) -DEGWDIR=\"$(EGWDIR)\" all: $(TPROG1) $(TPROG2) $(TPROG1): $(P1) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG1) $(P1) $(OLIB) $(TPROG2): $(P2) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG2) $(P2) $(OLIB) $(IRTCLLIB) \ $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm $(TPROG3): $(P3) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) WAISDIR=../../freeWAIS-sf-2.0 WAISLIB=$(IRTCLDIR)/wais-tcl.o $(WAISDIR)/ir/libwais.a $(TPROG4): $(P4) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG4) $(P4) \ $(OLIB) $(IRTCLLIB) \ $(WAISLIB) $(ZLIB) $(MOSILIB) $(NETLIB) $(TCLLIB) -lm install: install.prog install.script install.gif install.prog: @if [ ! -d $(CGIDIR) ]; then \ echo "Making directory $(CGIDIR)"; \ mkdir $(CGIDIR); \ fi @if [ ! -d $(EGWDIR) ]; then \ echo "Making directory $(EGWDIR)"; \ mkdir $(EGWDIR); \ fi @for x in $(TPROG1); do \ echo Installing $$x; \ cp $$x $(CGIDIR); \ chmod a+x $(CGIDIR)/$$x; \ done; \ for x in $(TPROG2); do \ echo Installing $$x; \ cp $$x $(EGWDIR); \ chmod a+x $(EGWDIR)/$$x; \ done; \ for p in egwtcl egwirtcl egwhtml; do \ rm -f $(EGWDIR)/$$p; \ ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \ done @if [ -x $(TPROG4) ]; then \ echo Installing $(TPROG4); \ cp $(TPROG4) $(EGWDIR)/$(TPROG4); \ chmod a+x $(EGWDIR)/$(TPROG4); \ fi install.script: @if [ ! -d $(EGWDIR) ]; then \ echo "Making directory $(EGWDIR)"; \ mkdir $(EGWDIR); \ fi @if [ ! -d $(HTDOCS) ]; then \ echo "Making directory $(HTDOCS)"; \ mkdir $(HTDOCS); \ fi @for x in *.egw *.tcl; do \ echo Installing $$x; \ cp $$x $(EGWDIR)/$$x; \ done @for x in $(HSCRIPTS); do \ echo Installing $$x; \ cp $$x $(HTDOCS); \ done @for x in $(CONFFILES); do \ echo Installing $$x; \ cp $$x $(EGWDIR); \ done install.gif: @if [ ! -d $(GIFDIR) ]; then \ echo "Making directory $(GIFDIR)"; \ mkdir $(GIFDIR); \ fi @for x in gif/*.gif; do \ echo Installing $$x; \ cp $$x $(GIFDIR); \ done .c.o: $(CC) -c $(DEFS) $(CFLAGS) $< clean: rm -f *.log *.[oa] $(TPROG1) $(TPROG2) $(TPROG3) rm -f core mon.out gmon.out errlist *~ depend: depend2 depend1: sed '/^#Depend/q' Makefile.tmp $(CPP) $(DEFS) -M *.c >>Makefile.tmp mv -f Makefile.tmp Makefile depend2: $(CPP) $(DEFS) -M *.c >.depend #GNU make style depend ifeq (.depend,$(wildcard .depend)) include .depend endif #Depend --- DOT NOT DELETE THIS LINE