## $Id: Makefile,v 1.3 2001/12/30 14:11:43 tellini Exp $ ## ## Makefile -- Build procedure for sample mod_accounting Apache module ## Autogenerated via ``apxs -n accounting -g''. ## # the used tools #APXS=apxs APACHECTL=apachectl .if !defined(WITHOUT_PGSQL) DEF_PGSQL= -DNEED_POSTGRES INC_PGSQL= -I${LOCALBASE}/include LIB_PGSQL= -L${LOCALBASE}/lib -lpq .endif .if !defined(WITHOUT_MYSQL) DEF_MYSQL= -DNEED_MYSQL INC_MYSQL= -I${LOCALBASE}/include LIB_MYSQL= -L${LOCALBASE}/lib/mysql -lmysqlclient .endif DEF=${DEF_MYSQL} ${DEF_PGSQL} INC=${INC_MYSQL} ${INC_PGSQL} LIB=${LIB_MYSQL} ${LIB_PGSQL} # the default target all: mod_accounting.so # compile the DSO file mod_accounting.so: mod_accounting.c postgres.c mysql.c $(APXS) -c $(DEF) $(INC) $(LIB) mod_accounting.c postgres.c mysql.c # install the DSO file into the Apache installation # and activate it in the Apache configuration install: all $(APXS) -i -a -n 'accounting' mod_accounting.so # cleanup clean: -rm -f *.o *.so *.bak # 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 # my quick debug stuff test: install stop start apachectl status tail /usr/local/apache/logs/error_log