Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergey Simonenko <sergey.simonenko@zabbix.com>2022-01-19 14:39:14 +0300
committerSergey Simonenko <sergey.simonenko@zabbix.com>2022-01-19 14:39:14 +0300
commit97f2760ea3b6421dfb761b0892df95ea52ac527d (patch)
treec287533af60c8797c33f9cafa41ed6ebb9d7d9a4 /build
parent6ccac7c2c0ad102a11fde31b3ece0f2215332d11 (diff)
...GI..... [ZBX-20444] updated nmake Makefiles
Diffstat (limited to 'build')
-rw-r--r--build/win32/project/Makefile_pcre.inc48
1 files changed, 36 insertions, 12 deletions
diff --git a/build/win32/project/Makefile_pcre.inc b/build/win32/project/Makefile_pcre.inc
index 96b0b0cc553..9eb3c078f84 100644
--- a/build/win32/project/Makefile_pcre.inc
+++ b/build/win32/project/Makefile_pcre.inc
@@ -1,22 +1,46 @@
-! IF "$(PCREINCDIR)" == ""
-! ERROR Please specify directory containing PCRE header files (e. g. PCREINCDIR=\somepath\include).
+! IF "$(PCREINCDIR)" == "" && "$(PCRE2INCDIR)" == ""
+! ERROR Please specify directory containing PCRE or PCRE2 header files (e. g. PCREINCDIR=\somepath\include or PCRE2INCDIR=\somepath\include).
! ENDIF
-! IF ("$(PCRELIBDIR)" == "")
-! ERROR Please specify PCRELIBDIR (e. g. PCRELIBDIR=\somepath\lib).
+! IF "$(PCRELIBDIR)" == "" && "$(PCRE2LIBDIR)" == ""
+! ERROR Please specify either PCRELIBDIR or PCRE2LIBDIR (e. g. PCRELIBDIR=\somepath\lib or PCRE2LIBDIR=\somepath\lib).
! ENDIF
-! IF EXISTS("$(PCREINCDIR)\pcre.h")
+! IF ("$(PCREINCDIR)" != "" && "$(PCRE2INCDIR)" != "") || ("$(PCRELIBDIR)" != "" && "$(PCRE2LIBDIR)" != "")
+! ERROR Cannot use both PCRE and PCRE2 at the same time!
+! ENDIF
+
+! IF "$(PCREINCDIR)" != ""
+! IF EXISTS("$(PCREINCDIR)\pcre.h")
CFLAGS = $(CFLAGS) /DPCRE_STATIC
INCS = $(INCS) /I "$(PCREINCDIR)"
-! ELSE
-! ERROR PCREINCDIR "$(PCREINCDIR)" cannot find "$(PCREINCDIR)\pcre.h"
+! ELSE
+! ERROR PCREINCDIR "$(PCREINCDIR)" cannot find "$(PCREINCDIR)\pcre.h"
+! ENDIF
+! ENDIF
+
+! IF "$(PCRE2INCDIR)" != ""
+! IF EXISTS("$(PCRE2INCDIR)\pcre2.h")
+CFLAGS = $(CFLAGS) /DPCRE2_STATIC
+INCS = $(INCS) /I "$(PCRE2INCDIR)"
+! ELSE
+! ERROR PCRE2INCDIR "$(PCRE2INCDIR)" cannot find "$(PCRE2INCDIR)\pcre2.h"
+! ENDIF
! ENDIF
-PCRELIB = $(PCRELIBDIR)\pcre.lib
+! IF "$(PCRELIBDIR)" != ""
+! IF EXISTS("$(PCRELIBDIR)\pcre.lib")
+LIBS = $(LIBS) "$(PCRELIBDIR)\pcre.lib"
+! ELSE
+! ERROR PCRELIBDIR "$(PCRELIBDIR)" cannot find "$(PCRELIBDIR)\pcre.lib"
+! ENDIF
+! ENDIF
-! IF EXISTS("$(PCRELIB)")
-LIBS = $(LIBS) "$(PCRELIB)"
-! ELSE
-! ERROR PCRELIBDIR "$(PCRELIBDIR)" cannot find PCRELIB "$(PCRELIB)"
+! IF "$(PCRE2LIBDIR)" != ""
+! IF EXISTS("$(PCRE2LIBDIR)\libpcre2-8.a")
+LIBS = $(LIBS) "$(PCRE2LIBDIR)\libpcre2-8.a"
+! ELSE
+! ERROR PCRE2LIBDIR "$(PCRE2LIBDIR)" cannot find "$(PCRE2LIBDIR)\libpcre2-8.a"
+! ENDIF
! ENDIF
+