1
1
###########################################################################
2
2
#
3
- # Usage: NMAKE -f Makefile.win APACHE={httpd installion dir} PCRE={pcre dir} LIBXML2={LibXML2 dir} [ LUA={Lua dir} ]
3
+ # Usage: NMAKE -f Makefile.win APACHE={httpd installion dir} PCRE|PCRE2 ={pcre dir} LIBXML2={LibXML2 dir} [ LUA={Lua dir} ]
4
4
#
5
+ !IF "$(PCRE2)" != ""
6
+ PCRE = $(PCRE2)
7
+ !ENDIF
8
+
5
9
!IF "$(APACHE)" == "" || "$(PCRE)" == "" || "$(LIBXML2)" == "" || "$(CURL)" == ""
6
- !ERROR NMAKE arguments: APACHE=dir PCRE=dir LIBXML2=dir CURL=dir are required to build mod_security2 for Windows
10
+ !ERROR NMAKE arguments: APACHE=dir PCRE|PCRE2 =dir LIBXML2=dir CURL=dir are required to build mod_security2 for Windows
7
11
!ENDIF
8
12
9
13
# Linking libraries
10
14
LIBS = $(APACHE)\lib\libhttpd.lib \
11
15
$(APACHE)\lib\libapr-1.lib \
12
16
$(APACHE)\lib\libaprutil-1.lib \
13
- $(PCRE)\pcre.lib \
14
- $(CURL)\libcurl.lib \
17
+ $(CURL)\libcurl.lib \
15
18
$(LIBXML2)\win32\bin.msvc\libxml2.lib \
16
19
Ws2_32.lib \
17
20
"iphlpapi.lib"
18
21
22
+ !IF "$(PCRE2)" != ""
23
+ LIBS =$(LIBS) $(PCRE2)\lib\pcre2-8.lib
24
+ !ELSE
25
+ LIBS =$(LIBS) $(PCRE)\lib\pcre.lib
26
+ !ENDIF
19
27
###########################################################################
20
28
###########################################################################
21
29
22
-
23
- !IF "$(IIS_BUILD)" == "yes"
24
- DEFS=$(DEFS) -DVERSION_IIS
25
- !ENDIF
26
-
30
+
31
+ !IF "$(IIS_BUILD)" == "yes"
32
+ DEFS=$(DEFS) -DVERSION_IIS
33
+ !ENDIF
34
+
27
35
CC = CL
28
36
29
37
MT = mt
@@ -37,9 +45,14 @@ INCLUDES = -I. -I.. \
37
45
-I$(PCRE)\include -I$(PCRE) \
38
46
-I$(LIBXML2)\include \
39
47
-I$(APACHE)\include
40
-
41
- # Enables support for SecRemoteRules and external resources.
42
- DEFS=$(DEFS) -DWITH_CURL -DWITH_REMOTE_RULES
48
+
49
+ # Enables support for SecRemoteRules and external resources.
50
+ DEFS=$(DEFS) -DWITH_CURL -DWITH_REMOTE_RULES
51
+
52
+ # Enable PCRE2
53
+ !IF "$(PCRE2)" != ""
54
+ DEFS =$(DEFS) -DWITH_PCRE2
55
+ !ENDIF
43
56
44
57
# Lua is optional
45
58
!IF "$(LUA)" != ""
@@ -65,8 +78,8 @@ OBJS = mod_security2.obj apache2_config.obj apache2_io.obj apache2_util.obj \
65
78
msc_parsers.obj msc_util.obj msc_pcre.obj persist_dbm.obj \
66
79
msc_reqbody.obj msc_geo.obj msc_gsb.obj msc_crypt.obj msc_tree.obj msc_unicode.obj acmp.obj msc_lua.obj \
67
80
msc_release.obj \
68
- msc_status_engine.obj \
69
- msc_remote_rules.obj \
81
+ msc_status_engine.obj \
82
+ msc_remote_rules.obj \
70
83
msc_json.obj \
71
84
libinjection/libinjection_html5.obj \
72
85
libinjection/libinjection_sqli.obj \
0 commit comments