summaryrefslogtreecommitdiff
path: root/win32/Makefile.mingw
diff options
context:
space:
mode:
authorPatrick von Reth <patrick.vonreth@gmail.com>2011-09-14 16:00:28 +0800
committerDaniel Veillard <veillard@redhat.com>2011-09-14 16:00:28 +0800
commitf1da8abb629cff85cadb3e2ff25b26419a1390f7 (patch)
tree95f2974ef793c93c750d333ff9439eaea152c508 /win32/Makefile.mingw
parentf5048b3e71fc30ad096970b8df6e7af073bae4cb (diff)
downloadlibxml2-f1da8abb629cff85cadb3e2ff25b26419a1390f7.tar.gz
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.
Diffstat (limited to 'win32/Makefile.mingw')
-rw-r--r--win32/Makefile.mingw14
1 files changed, 9 insertions, 5 deletions
diff --git a/win32/Makefile.mingw b/win32/Makefile.mingw
index a689f313..0f8198b9 100644
--- a/win32/Makefile.mingw
+++ b/win32/Makefile.mingw
@@ -41,7 +41,7 @@ endif
# The compiler and its options.
CC = gcc.exe
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)
CFLAGS += -D_REENTRANT
endif
@@ -66,20 +66,22 @@ LD = gcc.exe
LDFLAGS += -Wl,--major-image-version,$(LIBXML_MAJOR_VERSION)
LDFLAGS += -Wl,--minor-image-version,$(LIBXML_MINOR_VERSION)
LDFLAGS += -Wl,-L,$(BINDIR) -Wl,-L,$(LIBPREFIX)
-LIBS =
+LIBS =
ifeq ($(WITH_FTP),1)
CFLAGS += -D_WINSOCKAPI_
-LIBS += -lwsock32
+LIBS += -lwsock32 -lws2_32
endif
ifeq ($(WITH_HTTP),1)
CFLAGS += -D_WINSOCKAPI_
-LIBS += -lwsock32
+LIBS += -lwsock32 -lws2_32
endif
ifeq ($(WITH_ICONV),1)
LIBS += -liconv
endif
ifeq ($(WITH_ZLIB),1)
-LIBS += -lzdll
+# Could be named differently
+# LIBS += -lzdll
+LIBS += -lz
endif
ifeq ($(WITH_THREADS),posix)
LIBS += -lpthreadGC
@@ -88,6 +90,8 @@ ifeq ($(WITH_MODULES),1)
LIBS += -lkernel32
endif
+LIBS += $(LIB)
+
# The archiver and its options.
AR = ar.exe
ARFLAGS = -r