# Makefile # # LocalGate Local Filesystem -> WWW Gateway # # LocalGate allows a user to access HTML files on the local filesystem # as if they had a web server to access the files. # # Makefile: Makefile for LocalGate. # # Copyright (C) 1997 Michael Chu # This file is part of the LocalGate local filesystem -> WWW gateway. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Contact information: Michael Chu # mmchu@pobox.com # Version number. VERSION = 1.00 # Uncomment out this line if you want debug information included. # DEBUG = -g -Wall -ansi -pedantic DEBUG = ########################################################################### # Include MakefileOpts. include MakefileOpts ########################################################################### # Define the utilities to use for compilation. CC = gcc CCOPTS = $(DEBUG) LDOPTS = $(SOCKETOPT) $(FLOPT) $(LOPT) RM = rm RMOPTS = -rf ECHO = echo ECHOOPTS = TAR = tar TAROPTS = GZIP = gzip GZIPOPTS = -9 MKDIR = mkdir MKDIROPTS = CP = cp CPOPTS = CHMOD = chmod CHMODOPTS = -R +rw CD = cd CDOPTS = LN = ln LNOPTS = -s FLEX = flex FLEXOPTS = ########################################################################### all: localgate localgate: server.o htmlfilter.o netutils.o fileutils.o miscutils.o @$(ECHO) $(ECHOOPTS) Linking localgate from object components... @$(CC) $(CCOPTS) -o localgate server.o \ htmlfilter.o netutils.o fileutils.o miscutils.o $(LDOPTS) server.o: server.c server.h netutils.h miscutils.h @$(ECHO) $(ECHOOPTS) Compiling server.o from server.c... @$(CC) $(CCOPTS) -c server.c htmlfilter.o: htmlfilter.c htmlfilter.h fileutils.h @$(ECHO) $(ECHOOPTS) Compiling htmlfilter.o from htmlfilter.c... @$(CC) $(CCOPTS) -c htmlfilter.c netutils.o: netutils.c netutils.h htmlfilter.h fileutils.h @$(ECHO) $(ECHOOPTS) Compiling netutils.o from netutils.c... @$(CC) $(CCOPTS) -c netutils.c fileutils.o: fileutils.c fileutils.h @$(ECHO) $(ECHOOPTS) Compiling fileutils.o from fileutils.c... @$(CC) $(CCOPTS) -c fileutils.c miscutils.o: miscutils.c miscutils.h @$(ECHO) $(ECHOOPTS) Compiling miscutils.o from miscutils.c... @$(CC) $(CCOPTS) -c miscutils.c testsocketopt: empty.c @$(CC) $(CCOPTS) -o empty empty.c -lsocket testflopt: empty.c @$(CC) $(CCOPTS) -o empty empty.c -lfl testlopt: empty.c @$(CC) $(CCOPTS) -o empty empty.c -ll ########################################################################### clean: @$(ECHO) $(ECHOOPTS) Removing all old object files and libraries... @$(RM) $(RMOPTS) *~ *.o localgate empty make.log a.out