From 0fdfc4ced15ed29c407ad95cb0e1224711c1919d Mon Sep 17 00:00:00 2001 From: JasperVanEck Date: Thu, 28 Nov 2013 11:31:23 +0100 Subject: Added extension and functionvoid exmaple --- Examples/Extension/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Examples/Extension/Makefile (limited to 'Examples/Extension/Makefile') diff --git a/Examples/Extension/Makefile b/Examples/Extension/Makefile new file mode 100644 index 0000000..3815a68 --- /dev/null +++ b/Examples/Extension/Makefile @@ -0,0 +1,21 @@ +CPP = g++ +RM = rm -f +CPP_FLAGS = -Wall -c -I. -O2 -std=c++11 + +LD = g++ +LD_FLAGS = -Wall -shared -O2 +RESULT = extension.so + +SOURCES = $(wildcard *.cpp) +OBJECTS = $(SOURCES:%.cpp=%.o) + +all: ${OBJECTS} ${RESULT} + +${RESULT}: ${OBJECTS} + ${LD} ${LD_FLAGS} -o $@ ${OBJECTS} -lphpcpp + +clean: + ${RM} *.obj *~* ${OBJECTS} ${RESULT} + +${OBJECTS}: + ${CPP} ${CPP_FLAGS} -fpic -o $@ ${@:%.o=%.cpp} -- cgit v1.2.3