mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-10 08:58:16 +03:00
Fix the Windows build files
Patches comming from KDE project for Windows portability https://projects.kde.org/projects/kdesupport/emerge/repository/revisions/master/entry/portage/testing/libxml2-test/libxml2-2.7.8-20110801.diff To build libxml2 I had to patch the build system a little bit. The windows build system tries to link about zdll, but on windows its called zlib* too, so linking against z is enough. Also the --include and the --lib command was ignored. For the http and ftp stuff linking against some windows library's was forgotten for mingw.
This commit is contained in:
parent
f5048b3e71
commit
f1da8abb62
@ -41,7 +41,7 @@ endif
|
|||||||
# The compiler and its options.
|
# The compiler and its options.
|
||||||
CC = gcc.exe
|
CC = gcc.exe
|
||||||
CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS -DNOLIBTOOL
|
CFLAGS += -DWIN32 -D_WINDOWS -D_MBCS -DNOLIBTOOL
|
||||||
CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX)
|
CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE)
|
||||||
ifneq ($(WITH_THREADS),no)
|
ifneq ($(WITH_THREADS),no)
|
||||||
CFLAGS += -D_REENTRANT
|
CFLAGS += -D_REENTRANT
|
||||||
endif
|
endif
|
||||||
@ -66,20 +66,22 @@ LD = gcc.exe
|
|||||||
LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
|
LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
|
||||||
LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
|
LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
|
||||||
LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
|
LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
|
||||||
LIBS =
|
LIBS =
|
||||||
ifeq ($(WITH_FTP),1)
|
ifeq ($(WITH_FTP),1)
|
||||||
CFLAGS += -D_WINSOCKAPI_
|
CFLAGS += -D_WINSOCKAPI_
|
||||||
LIBS += -lwsock32
|
LIBS += -lwsock32 -lws2_32
|
||||||
endif
|
endif
|
||||||
ifeq ($(WITH_HTTP),1)
|
ifeq ($(WITH_HTTP),1)
|
||||||
CFLAGS += -D_WINSOCKAPI_
|
CFLAGS += -D_WINSOCKAPI_
|
||||||
LIBS += -lwsock32
|
LIBS += -lwsock32 -lws2_32
|
||||||
endif
|
endif
|
||||||
ifeq ($(WITH_ICONV),1)
|
ifeq ($(WITH_ICONV),1)
|
||||||
LIBS += -liconv
|
LIBS += -liconv
|
||||||
endif
|
endif
|
||||||
ifeq ($(WITH_ZLIB),1)
|
ifeq ($(WITH_ZLIB),1)
|
||||||
LIBS += -lzdll
|
# Could be named differently
|
||||||
|
# LIBS += -lzdll
|
||||||
|
LIBS += -lz
|
||||||
endif
|
endif
|
||||||
ifeq ($(WITH_THREADS),posix)
|
ifeq ($(WITH_THREADS),posix)
|
||||||
LIBS += -lpthreadGC
|
LIBS += -lpthreadGC
|
||||||
@ -88,6 +90,8 @@ ifeq ($(WITH_MODULES),1)
|
|||||||
LIBS += -lkernel32
|
LIBS += -lkernel32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LIBS += $(LIB)
|
||||||
|
|
||||||
# The archiver and its options.
|
# The archiver and its options.
|
||||||
AR = ar.exe
|
AR = ar.exe
|
||||||
ARFLAGS = -r
|
ARFLAGS = -r
|
||||||
|
@ -75,7 +75,9 @@ LIBS = $(LIBS) iconv.lib
|
|||||||
LIBS = $(LIBS) icu.lib
|
LIBS = $(LIBS) icu.lib
|
||||||
!endif
|
!endif
|
||||||
!if "$(WITH_ZLIB)" == "1"
|
!if "$(WITH_ZLIB)" == "1"
|
||||||
LIBS = $(LIBS) zdll.lib
|
# could be named differently zdll or zlib
|
||||||
|
# LIBS = $(LIBS) zdll.lib
|
||||||
|
LIBS = $(LIBS) zlib.lib
|
||||||
!endif
|
!endif
|
||||||
!if "$(WITH_THREADS)" == "posix"
|
!if "$(WITH_THREADS)" == "posix"
|
||||||
LIBS = $(LIBS) pthreadVC.lib
|
LIBS = $(LIBS) pthreadVC.lib
|
||||||
|
@ -269,8 +269,8 @@ function discoverVersion()
|
|||||||
vf.WriteLine("CRUNTIME=" + cruntime);
|
vf.WriteLine("CRUNTIME=" + cruntime);
|
||||||
vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
|
vf.WriteLine("VCMANIFEST=" + (vcmanifest? "1" : "0"));
|
||||||
} else if (compiler == "mingw") {
|
} else if (compiler == "mingw") {
|
||||||
vf.WriteLine("INCLUDE+=;" + buildInclude);
|
vf.WriteLine("INCLUDE+= -I" + buildInclude);
|
||||||
vf.WriteLine("LIB+=;" + buildLib);
|
vf.WriteLine("LIB+= -L" + buildLib);
|
||||||
} else if (compiler == "bcb") {
|
} else if (compiler == "bcb") {
|
||||||
vf.WriteLine("INCLUDE=" + buildInclude);
|
vf.WriteLine("INCLUDE=" + buildInclude);
|
||||||
vf.WriteLine("LIB=" + buildLib);
|
vf.WriteLine("LIB=" + buildLib);
|
||||||
@ -579,7 +579,7 @@ if (buildIncPrefix == "")
|
|||||||
if (buildLibPrefix == "")
|
if (buildLibPrefix == "")
|
||||||
buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
|
buildLibPrefix = "$(PREFIX)" + dirSep + "lib";
|
||||||
if (buildSoPrefix == "")
|
if (buildSoPrefix == "")
|
||||||
buildSoPrefix = "$(PREFIX)" + dirSep + "lib";
|
buildSoPrefix = "$(PREFIX)" + dirSep + "bin";
|
||||||
|
|
||||||
// Discover the version.
|
// Discover the version.
|
||||||
discoverVersion();
|
discoverVersion();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user