Makefile.apxs #1

  • //
  • guest/
  • hari_krishna_dara/
  • perforce/
  • webkeeper/
  • Makefile.apxs
  • View
  • Commits
  • Open Download .zip Download (1 KB)
##
##  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=/usr/local/src/perforce/r00.1/p4api

# 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: libwebkeep.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) $(APXS_CFLAGS) $(APXS_CFLAGS_SHLIB) -Wall -o $@ $< 

libwebkeep.so: mod_webkeep.c mod_webkeep2.o
	$(APXS) -c -o $@ mod_webkeep.c mod_webkeep2.o -L$(P4API) -lclient -lrpc -lsupp

clean:
	rm -f core *.o *.so
# Change User Description Committed
#1 5093 Hari Krishna Dara Populating perforce branch.
I will be adding p4admin files to it.
//guest/perforce_software/webkeeper/Makefile.apxs
#1 914 Stephen Vance Add apxs build capability, primarily to address Red Hat EAPI issues.