diff options
| author | jvoisin | 2017-09-26 15:08:42 +0200 |
|---|---|---|
| committer | jvoisin | 2017-09-26 15:08:42 +0200 |
| commit | 4dc382c63f4219cdbf5dd784f0d8025f6af68629 (patch) | |
| tree | 4c31f6e6af15e1989813552199bd8f319a5bf607 /Makefile | |
| parent | c49ad6a09fdd8e7d887f2600513648a8bd53fd09 (diff) | |
Simplify and improve the build system
- CFLAGS are now set in the config.m4 file (and not in the Makefile anymore)
- `make release` is added
- `make debug` and `make coverage` are now simpler
- hardening flags are added
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
| @@ -2,15 +2,23 @@ clean: | |||
| 2 | make -C src clean | 2 | make -C src clean |
| 3 | cd src; phpize --clean | 3 | cd src; phpize --clean |
| 4 | 4 | ||
| 5 | release: | ||
| 6 | cd src; phpize | ||
| 7 | cd src; ./configure --enable-snuffleupagus | ||
| 8 | make -C src | ||
| 9 | |||
| 10 | install: release | ||
| 11 | make -C install | ||
| 12 | |||
| 5 | debug: | 13 | debug: |
| 6 | cd src; phpize | 14 | cd src; phpize |
| 7 | export CFLAGS="-Wall -Wextra -g3 -ggdb -O1 -g -Wno-unused-function"; cd src; ./configure --enable-snuffleupagus --enable-debug | 15 | export CFLAGS="-g3 -ggdb -O1 -g"; cd src; ./configure --enable-snuffleupagus --enable-debug |
| 8 | make -C src | 16 | make -C src |
| 9 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test | 17 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test |
| 10 | 18 | ||
| 11 | coverage: | 19 | coverage: |
| 12 | cd src; phpize | 20 | cd src; phpize |
| 13 | export CFLAGS="--coverage"; cd src; ./configure --enable-snuffleupagus --enable-coverage | 21 | cd src; ./configure --enable-snuffleupagus --enable-coverage |
| 14 | make -C src | 22 | make -C src |
| 15 | rm -Rf src/COV.html | 23 | rm -Rf src/COV.html |
| 16 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test | 24 | TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test |
