Configuring and Managing MPE/iX Internet Services (July 2001)

186 Chapter9
Apache for MPE/iX
Sample Module Code (mod_hw)
APXS Default Makefile (mod_hw)
This is the Makefile auto-generated by apxs -g -n hw.
##
## Makefile -- Build procedure for sample hw Apache module
## Autogenerated via ``apxs -n hw -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_hw.so
# compile the shared object file
mod_hw.so: mod_hw.c
$(APXS) -c $(DEF) $(INC) $(LIB) mod_hw.c
# install the shared object file into Apache
install: all
$(APXS) -i -a -n 'hw' mod_hw.so
# cleanup
clean:
-rm -f mod_hw.o mod_hw.so
# simple test
test: reload
lynx -mime_header http://localhost/hw
# 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