summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..869f9fb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
1clean:
2 make -C src clean
3 cd src; phpize --clean
4
5debug:
6 cd src; phpize
7 export CFLAGS="-Wall -Wextra -g3 -ggdb -Wno-unused-function"; cd src; ./configure --enable-snuffleupagus --enable-debug
8 make -C src
9 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
10
11coverage:
12 cd src; phpize
13 export CFLAGS="--coverage -fprofile-arcs -ftest-coverage -O0"; export LDFLAGS="--coverage"; cd src; ./configure --enable-snuffleupagus --enable-coverage
14 make -C src
15 lcov --base-directory src --directory ./src --zerocounters -q --rc lcov_branch_coverage=1
16 rm -Rf src/COV.html
17 TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test
18 lcov --base-directory ./src --directory src -c -o ./src/COV.info --rc lcov_branch_coverage=1 2>/dev/null 1>/dev/null
19 lcov --remove src/COV.info '/usr/*' --remove src/COV.info '*tweetnacl.c' -o src/COV.info --rc lcov_branch_coverage=1 2>/dev/null 1>/dev/null
20 genhtml -o src/COV.html ./src/COV.info --branch-coverage
21
22tests: joomla
23
24joomla:
25 if [ -nd "joomla-cms" ]; then git clone --depth 1 git@github.com:joomla/joomla-cms.git; fi
26 cd joomla-cms; composer install
27 cd joomla-cms; libraries/vendor/phpunit/phpunit/phpunit -d extension=./src/modules/snuffleupagus.so
28
29packages: debian
30
31debian:
32 dpkg-buildpackage -i -us -uc -tc -I -rfakeroot