Debian Codegraph @

others/libinjection/php/Makefile

raw
1 #
2 # this requires swig, and an installation of php (and php-dev tools)
3 #
4 # everything is copied and generating int the build directory
5 #
6
7 all: module
8
9 build/modules/libinjection.so: build build/libinjection.h build/libinjection_sqli.h build/libinjection_sqli.c build/libinjection_sqli_data.h build/config.m4 build/libinjection.i
10 swig -version
11 (cd build; swig -noproxy -php -Wall -Wextra libinjection.i)
12 (cd build; phpize; ./configure ; make )
13
14 module: build/modules/libinjection.so
15
16 test: build/modules/libinjection.so
17 mkdir -p build/tests
18 ./gentests.py
19 cp testsupport.php build/
20 (cd build; export NO_INTERACTION=1 && make test)
21 .PHONY: test
22
23 install: build/modules/libinjection.so
24 (cd build; make install)
25
26 build:
27 mkdir build
28
29 build/libinjection.h: ../src/libinjection.h
30 cp ../src/libinjection.h build/libinjection.h
31
32 build/libinjection_sqli.c: ../src/libinjection_sqli.c
33 cp ../src/libinjection_sqli.c build/libinjection_sqli.c
34
35 build/libinjection_sqli.h: ../src/libinjection_sqli.h
36 cp ../src/libinjection_sqli.h build/libinjection_sqli.h
37
38 build/libinjection_sqli_data.h: ../src/libinjection_sqli_data.h
39 cp ../src/libinjection_sqli_data.h build/libinjection_sqli_data.h
40
41 build/libinjection.i: libinjection.i
42 cp libinjection.i build/
43
44 build/config.m4: config.m4
45 mkdir -p build
46 cp config.m4 build/config.m4
47
48
49 #
50 # old
51 #
52 words.php: Makefile json2php.py ../src/sqlparse_data.json
53 ./json2php.py < ../src/sqlparse_data.json > words.php
54
55 clean:
56 rm -f *~ *.o *.so
57 rm -f words.php
58 rm -rf build