mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-15 23:24:06 +03:00
introduced a more flexible thread build
This commit is contained in:
parent
2103b053e6
commit
0ad7829a68
@ -71,7 +71,7 @@ UTILS_INTDIR = utils.int
|
||||
# The preprocessor and its options.
|
||||
CPP = cl.exe /EP
|
||||
CPPFLAGS = /nologo /I$(XML_SRCDIR)\include
|
||||
!if "$(WITH_THREADS)" == "1"
|
||||
!if "$(WITH_THREADS)" != "no"
|
||||
CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
|
||||
!endif
|
||||
|
||||
@ -79,9 +79,16 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
|
||||
CC = cl.exe
|
||||
CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 /MD
|
||||
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
|
||||
!if "$(WITH_THREADS)" == "1"
|
||||
!if "$(WITH_THREADS)" != "no"
|
||||
CFLAGS = $(CFLAGS) /D "_REENTRANT"
|
||||
!endif
|
||||
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls"
|
||||
CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS" /D "HAVE_COMPILER_TLS"
|
||||
!else if "$(WITH_THREADS)" == "native"
|
||||
CFLAGS = $(CFLAGS) /D "HAVE_WIN32_THREADS"
|
||||
!else if "$(WITH_THREADS)" == "posix"
|
||||
CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
|
||||
!endif
|
||||
!if "$(WITH_ZLIB)" == "1"
|
||||
CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H"
|
||||
!endif
|
||||
@ -100,6 +107,9 @@ LIBS = $(LIBS) iconv.lib
|
||||
!if "$(WITH_ZLIB)" == "1"
|
||||
LIBS = $(LIBS) zlib.lib
|
||||
!endif
|
||||
!if "$(WITH_THREADS)" == "posix"
|
||||
LIBS = $(LIBS) pthreadVC.lib
|
||||
!endif
|
||||
|
||||
# The archiver and its options.
|
||||
AR = lib.exe
|
||||
@ -192,6 +202,11 @@ UTILS = $(BINDIR)\xmllint.exe\
|
||||
$(BINDIR)\testSchemas.exe\
|
||||
$(BINDIR)\testURI.exe\
|
||||
$(BINDIR)\testXPath.exe
|
||||
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls" || "$(WITH_THREADS)" == "native"
|
||||
UTILS = $(UTILS) $(BINDIR)\testThreadsWin32.exe
|
||||
!else if "$(WITH_THREADS)" == "posix"
|
||||
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
|
||||
!endif
|
||||
|
||||
all : libxml libxmla utils
|
||||
|
||||
@ -282,7 +297,7 @@ $(UTILS_INTDIR) :
|
||||
!else
|
||||
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
|
||||
$(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
|
||||
$(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(UTILS_INTDIR)\$(<B).obj
|
||||
$(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
|
||||
!endif
|
||||
|
||||
# Builds xmllint and friends. Uses the implicit rule for commands.
|
||||
|
Loading…
x
Reference in New Issue
Block a user