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

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

CC=$(APXS)
INC=-I $(APXS) -q INCLUDEDIR $(APXS) -q CFLAGS
LD_SHLIB=`$(APXS) -q LDFLAGS_SHLIB`

SRC = mod_webkit.c marshal.c
OBJ = ${SRC:.c=.o}
SOBJ = ${SRC:.c=.lo}

#   the default target
all: mod_webkit.so

#   compile the DSO file
mod_webkit.so: $(OBJ)
	$(APXS) -o mod_webkit.la -c $(SOBJ)

mod_webkit.o : mod_webkit.c
	$(APXS) -c mod_webkit.c

marshal.o : marshal.c
	$(APXS) -c marshal.c


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

#   cleanup
clean:
	-rm -rf *.o *.lo *.slo *.la .libs


#   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

