# Makefile for www gateway utility # Europagate, 1995 # # $Id: Makefile,v 1.42 1997/01/24 13:13:10 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 #ELIB=-lnsl -lsocket OLIB=../lib/util.a ../lib/libres+log.a TCLLIB=-L/usr/local/lib -ltcl8.0 -lm 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 EGWUSER=nobody HTTPDDIR=/usr/local/etc/httpd CGIDIR=$(HTTPDDIR)/cgi-bin HTDOCS=$(HTTPDDIR)/htdocs EGWDIR=$(HTTPDDIR)/egw GIFDIR=$(HTDOCS)/egwgif 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) $(TCLLIB) $(ELIB) $(TPROG3): $(P3) $(OLIB) $(CC) $(CFLAGS) -o $(TPROG3) $(P3) $(OLIB) $(ELIB) 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) $(TCLLIB) $(ELIB) 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 @chown $(EGWUSER) $(EGWDIR) @for x in $(TPROG1); do \ echo Installing $$x; \ cp $$x $(CGIDIR); \ chown $(EGWUSER) $(CGIDIR)/$$x; \ chmod +x $(CGIDIR)/$$x; \ chmod u+s $(CGIDIR)/$$x; \ done; \ for x in $(TPROG2); do \ echo Installing $$x; \ cp $$x $(EGWDIR)/$$x; \ chown $(EGWUSER) $(EGWDIR)/$$x; \ chmod +x $(EGWDIR)/$$x; \ done; \ for p in egwtcl egwirtcl egwhtml; do \ rm -f $(EGWDIR)/$$p; \ ln $(EGWDIR)/$(TPROG2) $(EGWDIR)/$$p; \ chown $(EGWUSER) $(EGWDIR)/$$p; \ done @if [ -x $(TPROG4) ]; then \ echo Installing $(TPROG4); \ cp $(TPROG4) $(EGWDIR)/$(TPROG4); \ chmod +x $(EGWDIR)/$(TPROG4); \ chown $(EGWUSER) $(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; \ chown $(EGWUSER) $(EGWDIR)/$$x; \ done @for x in $(HSCRIPTS); do \ echo Installing $$x; \ cp $$x $(HTDOCS); \ chmod a+r $(HTDOCS)/$$x; \ done @for x in $(CONFFILES); do \ echo Installing $$x; \ cp $$x $(EGWDIR); \ chown $(EGWUSER) $(EGWDIR)/$$x; \ done install.gif: @if [ ! -d $(GIFDIR) ]; then \ echo "Making directory $(GIFDIR)"; \ mkdir $(GIFDIR); \ chmod a+x $(GIFDIR); \ fi @cd gif; for x in *.gif; do \ echo Installing $$x; \ cp $$x $(GIFDIR); \ chmod a+r $(GIFDIR)/$$x; \ 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