
#
# Copyright (C) 2000  Daemon Consulting Inc.
# 
# 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
#


##
##  Makefile -- Build procedure for sample speedycgi Apache module
##  Autogenerated via ``apxs -n speedycgi -g''.
##

#   the used tools
APXS=apxs
APACHECTL=apachectl

#   additional defines, includes and libraries
#DEF=-Dmy_define=my_value
INC=-I../src -I.
#LIB=-Lmy/lib/dir -lmylib

CFILES= $(SRC_CFILES)

#   the default target
all: mod_speedycgi.so

#   compile the shared object file
mod_speedycgi.so: $(CFILES)
	$(APXS) -c -Wc,-Wall -DSPEEDY_PROGNAME="\\\"mod_speedycgi\\\"" -o mod_speedycgi.so $(DEF) $(INC) $(LIB) $(CFILES); ../util/check_syms mod_speedycgi.so

#   install the shared object file into Apache 
install: all
	$(APXS) -i -a -n 'speedycgi' mod_speedycgi.so

#   cleanup
clean:
	-mv -f Makefile Makefile.old
	-rm -f $(OFILES) mod_speedycgi.so $(C_FILE_CLEAN) speedy.h

#   simple test
test:

#   install and activate shared object by reloading Apache to
#   force a reload of the shared object file
reload: install restart

#   the general Apache start/restart/stop
#   procedures
start:
	$(APACHECTL) start
restart:
	$(APACHECTL) restart
stop:
	$(APACHECTL) stop

