## ## Makefile -- APXS build procedure for mod_webkeep Apache module ## ## Based on the contribution to Perforce by Kyle VanderBeek <kylev@yaga.com> # Change this to the location where you un-tar'ed the p4api.tar P4API_HEADERS=/Users/matt/clients/public/webkeeper/p4api/include/p4 P4API_LIBS=/Users/matt/clients/public/webkeeper/p4api/lib # Change this to where your apxs (from Apache) program is APXS=/usr/sbin/apxs # Pick your compilers CXX=g++ ##### NO CHANGES should be needed below this line #####-------------------------------------------- # Get all of apxs's internal values. APXS_TARGET=`$(APXS) -q TARGET` APXS_CFLAGS=`$(APXS) -q CFLAGS` APXS_SBINDIR=`$(APXS) -q SBINDIR` APXS_CFLAGS_SHLIB=`$(APXS) -q CFLAGS_SHLIB` APXS_INCLUDEDIR=`$(APXS) -q INCLUDEDIR` APXS_LD_SHLIB=`$(APXS) -q LD_SHLIB` APXS_LIBEXECDIR=`$(APXS) -q LIBEXECDIR` APXS_LDFLAGS_SHLIB=`$(APXS) -q LDFLAGS_SHLIB` APXS_SYSCONFDIR=`$(APXS) -q SYSCONFDIR` APXS_LIBS_SHLIB=`$(APXS) -q LIBS_SHLIB` # the default target all: mod_webkeep.so # compile the shared object file. use g++ instead of letting apxs call # ld so we end up with the right c++ stuff. We do this in two steps, # compile and link. # compile mod_webkeep2.o: mod_webkeep2.cc mod_webkeep.h $(CXX) -c -fPIC -I. -I $(P4API_HEADERS) -I$(APXS_INCLUDEDIR) $(APXS_CFLAGS) -Wall -o $@ $< mod_webkeep.o: mod_webkeep.c gcc -fPIC -DSHARED_MODULE -I/usr/include/apr-1 -I$(APXS_INCLUDEDIR) -I. $(APXS_CFLAGS) -o $@ -c $< # link with g++ instead of apxs so that we get all the C++ bits we need mod_webkeep.so: mod_webkeep2.o mod_webkeep.o $(CXX) -fPIC -shared -o $@ mod_webkeep.o mod_webkeep2.o -L$(P4API_LIBS) -lclient -lrpc -lsupp $(APXS_LIBS_SHLIB) clean: rm -f core *.o *.so *.slo *.lo *.la
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 6194 | Matt Attaway | A test edit | ||
#4 | 6193 | Matt Attaway |
Make the clean step a little more aggressive. Again. |
||
#3 | 6190 | Matt Attaway | Clean up clean step in makefile and add new tested platforms | ||
#2 | 6185 | Matt Attaway |
Update makefile to work with modern Unix systems This change switches to using g+ to link the .so instead of relying on apxs. It also cleans up some warnings. The makefile for compiling Webkeeper into Apache probably needs some work. |
||
#1 | 5894 | Matt Attaway | Branch Webkeeper code for Apache 2.x compatability project | ||
//guest/perforce_software/webkeeper/Makefile.apxs | |||||
#1 | 914 | Stephen Vance | Add apxs build capability, primarily to address Red Hat EAPI issues. |