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

#   the used tools
APXS=apxs
APACHECTL=apachectl

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

# Solaris 5.7 POSIX Support Library
#LIB=-lrt



#   the default target
all: mod_throttle.so

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

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

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

#   simple test
test: reload
	lynx -mime_header http://localhost/throttle-status

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

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

