summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-24 19:43:07 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-08-24 19:43:07 +0200
commitd29c1a960798bbfa351b1aa3426d6f0a79ffe92c (patch)
treec5bcf743ad088df03c1b54da98754032c08c300e /src/Makefile
parentfe3c7fdf52e4bfd6e736a54c20eb12bb5cfd1f30 (diff)
The extension::initialize() and extension::finalize() methods are called at the appropriate time
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile23
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}
+