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

#   the used tools
APXS=/usr/local/apache/bin/apxs
APACHECTL=/usr/local/apache/bin/apachectl

#   additional user defines, includes and libraries
#DEF=
#INC=-I./
#LIB=-lphobos

#   the default target


#all: mod_xsi.so


all: mod_xsi.so


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

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

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

#   simple test
test: reload
	lynx -mime_header http://localhost/xsi/test.xsi

configtest:
	$(APACHECTL) configtest

#   reload the module by installing and restarting Apache
reload: install restart

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

