File: Makefile

package info (click to toggle)
modsecurity 3.0.14-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88,920 kB
  • sloc: ansic: 174,512; sh: 43,569; cpp: 26,214; python: 15,734; makefile: 3,864; yacc: 2,947; lex: 1,359; perl: 1,243; php: 42; tcl: 4
file content (58 lines) | stat: -rw-r--r-- 1,505 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# this requires swig, and an installation of php (and php-dev tools)
#
# everything is copied and generating int the build directory
#

all: module

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
	swig -version
	(cd build; swig -noproxy -php -Wall -Wextra libinjection.i)
	(cd build; phpize; ./configure ; make )

module: build/modules/libinjection.so

test: build/modules/libinjection.so
	mkdir -p build/tests
	./gentests.py
	cp testsupport.php build/
	(cd build; export NO_INTERACTION=1 && make test)
.PHONY: test

install: build/modules/libinjection.so
	(cd build; make install)

build:
	mkdir build

build/libinjection.h: ../src/libinjection.h
	cp ../src/libinjection.h build/libinjection.h

build/libinjection_sqli.c: ../src/libinjection_sqli.c
	cp ../src/libinjection_sqli.c build/libinjection_sqli.c

build/libinjection_sqli.h: ../src/libinjection_sqli.h
	cp ../src/libinjection_sqli.h build/libinjection_sqli.h

build/libinjection_sqli_data.h: ../src/libinjection_sqli_data.h
	cp ../src/libinjection_sqli_data.h build/libinjection_sqli_data.h

build/libinjection.i: libinjection.i
	cp libinjection.i build/

build/config.m4: config.m4
	mkdir -p build
	cp config.m4 build/config.m4


#
# old
#
words.php: Makefile json2php.py ../src/sqlparse_data.json
	./json2php.py < ../src/sqlparse_data.json > words.php

clean:
	rm -f *~ *.o *.so
	rm -f words.php
	rm -rf build