summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-18 23:35:35 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-18 23:35:35 +0100
commit778561e1739a4a7ef20e85b713b4790e6be225d3 (patch)
treed1ff42f6b6f8d6aa68f88319506aba91394aded0 /Makefile
parentbfaed88493de0a3ebd7f2619cb11291cd09252b1 (diff)
parentda5521c2c168edc48e7d2b5dd12305c9dec85b7b (diff)
Merge pull request #44 from valmat/unit-test
Unit tests
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 32fd0b0..516ab06 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,17 @@ PHP_DIR = /usr/include/php5
#
+# PHP binary file
+#
+# The path to the executable PHP binary file.
+# Need to run tests.
+# You can see the command "whereis php"
+#
+
+PHP_BIN = /usr/bin/php
+
+
+#
# Installation directory
#
# When you install the PHP-CPP library, it will place a number of C++ *.h
@@ -126,6 +137,10 @@ OBJECTS = $(SOURCES:%.cpp=%.o)
#
all: ${OBJECTS} ${RESULT}
+ @echo
+ @echo "Build complete."
+ @echo "Don't forget to run 'make test'."
+ @echo
${RESULT}: ${OBJECTS}
${LINKER} ${LINKER_FLAGS} -o $@ ${OBJECTS}
@@ -141,4 +156,6 @@ install:
${CP} phpcpp.h ${INSTALL_HEADERS}
${CP} include/*.h ${INSTALL_HEADERS}/phpcpp
${CP} ${RESULT} ${INSTALL_LIB}
+test:
+ cd tests && ./test.sh -p ${PHP_BIN}