##
##  Makefile -- Build procedure for mod_interchange Apache module
##  Originally autogenerated via ``apxs -n mod_interchange -g''.
##

#   the used tools
APXS=apxs
APACHECTL=apachectl

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

#   the default target
all: mod_interchange.so

#   compile the shared object file
mod_interchange.so: mod_interchange.c
	$(APXS) -c $(DEF) $(INC) $(LIB) mod_interchange.c

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

#   cleanup
clean:
	-rm -f mod_interchange.o mod_interchange.so

#   simple test
test: reload
	lynx -mime_header http://localhost/mod_interchange

#   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

