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

#   the used tools
APACHE=$(HOME)/apache13
APXS=$(APACHE)/bin/apxs
APACHECTL=$(APACHE)/bin/apachectl

#   additional user defines, includes and libraries
#DEF=-Dmy_define=my_value
#INC=-Imy/include/dir
#LIB=-Lmy/lib/dir -lmylib

#   the default target
all: mod_include.so

#   compile the DSO file
mod_include.so: mod_include.c
	$(APXS) -c $(DEF) $(INC) $(LIB) mod_include.c

#   install the DSO file into the Apache installation
#   and activate it in the Apache configuration
install: all
	$(APXS) -i -n 'cache_include' mod_include.so

#   cleanup
clean:
	rm -f mod_include.o mod_include.so
	rm -f *~
	rm -f core

#   reload the module by installing and restarting Apache
reload: stop install start

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