summaryrefslogtreecommitdiff
path: root/Examples/simple/Makefile
diff options
context:
space:
mode:
authorJasperVanEck <jaspergkurtz@gmail.com>2013-11-28 10:02:43 +0100
committerJasperVanEck <jaspergkurtz@gmail.com>2013-11-28 10:02:43 +0100
commit815ad7ce6e7b129c52891446d1ecf10390b34dac (patch)
tree6f983a8ade641ae09f69682b45d6a5596d23a0d3 /Examples/simple/Makefile
parent4d85e028c2f05ea1dfc8c5797db4703deb6c698e (diff)
Moved tests to Examples
Diffstat (limited to 'Examples/simple/Makefile')
-rw-r--r--Examples/simple/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/simple/Makefile b/Examples/simple/Makefile
new file mode 100644
index 0000000..e60be3a
--- /dev/null
+++ b/Examples/simple/Makefile
@@ -0,0 +1,22 @@
+CPP = g++
+RM = rm -f
+CPP_FLAGS = -Wall -c -I. -O2 -std=c++11
+
+LD = g++
+LD_FLAGS = -Wall -shared -O2
+RESULT = simple.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}
+