diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:43:07 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2013-08-24 19:43:07 +0200 |
commit | d29c1a960798bbfa351b1aa3426d6f0a79ffe92c (patch) | |
tree | c5bcf743ad088df03c1b54da98754032c08c300e /src/Makefile | |
parent | fe3c7fdf52e4bfd6e736a54c20eb12bb5cfd1f30 (diff) |
The extension::initialize() and extension::finalize() methods are called at the appropriate time
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..162e7ee --- /dev/null +++ b/src/Makefile @@ -0,0 +1,23 @@ +CPP = g++ +RM = rm -f +PHP_DIR = /usr/include/php5 +CPP_FLAGS = -c -I. -I${PHP_DIR} -I${PHP_DIR}/main -I${PHP_DIR}/ext -I${PHP_DIR}/Zend -I${PHP_DIR}/TSRM -O2 + +LD = g++ +LD_FLAGS = -Wall -shared -O2 +RESULT = libphpcpp.so + +SOURCES = $(wildcard *.cpp) +OBJECTS = $(SOURCES:%.cpp=%.o) + +all: ${OBJECTS} ${RESULT} + +${RESULT}: ${OBJECTS} + ${LD} ${LD_FLAGS} -o $@ ${OBJECTS} + +clean: + ${RM} *.obj *~* ${OBJECTS} ${RESULT} + +${OBJECTS}: + ${CPP} ${CPP_FLAGS} -fpic -o $@ ${@:%.o=%.cpp} + |