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

#   the used tools
APXS=/usr/sbin/apxs
APACHECTL=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_suid.so

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

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

install2: all
	cp -f mod_suid.so /usr/lib/apache


#   cleanup
clean:
	-rm -f mod_suid.o mod_suid.so suid_test

#   simple suid
suid: reload
	lynx -mime_header http://localhost/suid

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

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

