1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-06 05:57:39 +03:00
libxml2/win32/Makefile.msvc

427 lines
13 KiB
Makefile
Raw Normal View History

# Makefile for libxml2, specific for Windows, MSVC and NMAKE.
#
# Take a look at the beginning and modify the variables to suit your
# environment. Having done that, you can do a
#
# nmake [all] to build the libxml and the accompanying utilities.
# nmake clean to remove all compiler output files and return to a
# clean state.
# nmake rebuild to rebuild everything from scratch. This basically does
# a 'nmake clean' and then a 'nmake all'.
# nmake install to install the library and its header files.
#
# March 2002, Igor Zlatkovic <igor@zlatkovic.com>
# There should never be a need to modify anything below this line.
# ----------------------------------------------------------------
AUTOCONF = .\config.msvc
!include $(AUTOCONF)
# Names of various input and output components.
XML_NAME = xml2
XML_BASENAME = lib$(XML_NAME)
XML_SO = $(XML_BASENAME).dll
XML_RES = $(XML_BASENAME).res
XML_IMP = $(XML_BASENAME).lib
XML_DEF = $(XML_BASENAME).def
XML_A = $(XML_BASENAME)_a.lib
XML_A_DLL = $(XML_BASENAME)_a_dll.lib
# Place where we let the compiler put its output.
BINDIR = bin.msvc
XML_INTDIR = int.msvc
XML_INTDIR_A = int.a.msvc
XML_INTDIR_A_DLL = int.a.dll.msvc
UTILS_INTDIR = int.utils.msvc
# The preprocessor and its options.
CPP = cl.exe /EP
CPPFLAGS = /nologo /I$(XML_SRCDIR)\include /D "NOLIBTOOL"
!if "$(WITH_THREADS)" != "no"
2002-04-10 21:57:11 +00:00
CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
!endif
# The compiler and its options.
CC = cl.exe
CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(CRUNTIME)
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
!if "$(WITH_THREADS)" != "no"
CFLAGS = $(CFLAGS) /D "_REENTRANT"
!endif
!if "$(WITH_THREADS)" == "yes" || "$(WITH_THREADS)" == "ctls"
CFLAGS = $(CFLAGS) /D "HAVE_COMPILER_TLS"
!else if "$(WITH_THREADS)" == "posix"
CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
!endif
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
# The linker and its options.
LD = link.exe
LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
LIBS =
!if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
LIBS = $(LIBS) wsock32.lib ws2_32.lib
!endif
!if "$(WITH_ICONV)" == "1"
LIBS = $(LIBS) iconv.lib
!endif
2010-11-10 10:13:51 -05:00
!if "$(WITH_ICU)" == "1"
!if "$(STATIC)" == "1"
LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
!else
LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
!endif
2010-11-10 10:13:51 -05:00
!endif
2002-09-20 16:40:17 +00:00
!if "$(WITH_ZLIB)" == "1"
# could be named differently zdll or zlib
# LIBS = $(LIBS) zdll.lib
LIBS = $(LIBS) zlib.lib
2002-09-20 16:40:17 +00:00
!endif
2012-03-21 10:37:06 -04:00
!if "$(WITH_LZMA)" == "1"
LIBS = $(LIBS) liblzma.lib
!endif
!if "$(WITH_THREADS)" == "posix"
LIBS = $(LIBS) pthreadVC.lib
!endif
!if "$(WITH_MODULES)" == "1"
LIBS = $(LIBS) kernel32.lib
!endif
# The archiver and its options.
AR = lib.exe
ARFLAGS = /nologo
# Optimisation and debug symbols.
!if "$(DEBUG)" == "1"
CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
LDFLAGS = $(LDFLAGS) /DEBUG
!else
CFLAGS = $(CFLAGS) /D "NDEBUG" /O2
# commented out as this break VC10 c.f. 634846
# LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
LDFLAGS = $(LDFLAGS)
!endif
# append CFLAGS etc. passed on command line
CPPFLAGS = $(CPPFLAGS) $(EXTRA_CPPFLAGS)
CFLAGS = $(CFLAGS) $(EXTRA_CFLAGS)
LDFLAGS = $(LDFLAGS) $(EXTRA_LDFLAGS)
# Libxml object files.
XML_OBJS = $(XML_INTDIR)\buf.obj\
$(XML_INTDIR)\c14n.obj\
$(XML_INTDIR)\catalog.obj\
$(XML_INTDIR)\chvalid.obj\
$(XML_INTDIR)\debugXML.obj\
2003-08-25 09:05:12 +00:00
$(XML_INTDIR)\dict.obj\
$(XML_INTDIR)\encoding.obj\
$(XML_INTDIR)\entities.obj\
$(XML_INTDIR)\error.obj\
$(XML_INTDIR)\globals.obj\
$(XML_INTDIR)\hash.obj\
$(XML_INTDIR)\HTMLparser.obj\
$(XML_INTDIR)\HTMLtree.obj\
$(XML_INTDIR)\legacy.obj\
$(XML_INTDIR)\list.obj\
$(XML_INTDIR)\nanoftp.obj\
$(XML_INTDIR)\nanohttp.obj\
$(XML_INTDIR)\parser.obj\
$(XML_INTDIR)\parserInternals.obj\
2003-12-11 13:56:54 +00:00
$(XML_INTDIR)\pattern.obj\
2003-02-08 17:53:46 +00:00
$(XML_INTDIR)\relaxng.obj\
2003-08-25 09:05:12 +00:00
$(XML_INTDIR)\SAX2.obj\
$(XML_INTDIR)\SAX.obj\
$(XML_INTDIR)\schematron.obj\
$(XML_INTDIR)\threads.obj\
$(XML_INTDIR)\tree.obj\
$(XML_INTDIR)\uri.obj\
$(XML_INTDIR)\valid.obj\
$(XML_INTDIR)\xinclude.obj\
$(XML_INTDIR)\xlink.obj\
$(XML_INTDIR)\xmlIO.obj\
$(XML_INTDIR)\xmlmemory.obj\
2002-12-16 18:45:29 +00:00
$(XML_INTDIR)\xmlreader.obj\
2002-04-16 17:57:17 +00:00
$(XML_INTDIR)\xmlregexp.obj\
$(XML_INTDIR)\xmlmodule.obj\
$(XML_INTDIR)\xmlsave.obj\
2002-04-16 17:57:17 +00:00
$(XML_INTDIR)\xmlschemas.obj\
$(XML_INTDIR)\xmlschemastypes.obj\
$(XML_INTDIR)\xmlunicode.obj\
$(XML_INTDIR)\xmlwriter.obj\
$(XML_INTDIR)\xpath.obj\
$(XML_INTDIR)\xpointer.obj\
$(XML_INTDIR)\xmlstring.obj
2002-09-29 17:54:00 +00:00
# Static libxml object files.
XML_OBJS_A = $(XML_INTDIR_A)\buf.obj\
$(XML_INTDIR_A)\c14n.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\catalog.obj\
$(XML_INTDIR_A)\chvalid.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\debugXML.obj\
2003-08-25 09:05:12 +00:00
$(XML_INTDIR_A)\dict.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\encoding.obj\
$(XML_INTDIR_A)\entities.obj\
$(XML_INTDIR_A)\error.obj\
$(XML_INTDIR_A)\globals.obj\
$(XML_INTDIR_A)\hash.obj\
$(XML_INTDIR_A)\HTMLparser.obj\
$(XML_INTDIR_A)\HTMLtree.obj\
$(XML_INTDIR_A)\legacy.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\list.obj\
$(XML_INTDIR_A)\nanoftp.obj\
$(XML_INTDIR_A)\nanohttp.obj\
$(XML_INTDIR_A)\parser.obj\
$(XML_INTDIR_A)\parserInternals.obj\
2003-12-11 13:56:54 +00:00
$(XML_INTDIR_A)\pattern.obj\
2003-02-08 17:53:46 +00:00
$(XML_INTDIR_A)\relaxng.obj\
2003-08-25 09:05:12 +00:00
$(XML_INTDIR_A)\SAX2.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\SAX.obj\
$(XML_INTDIR_A)\schematron.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\threads.obj\
$(XML_INTDIR_A)\tree.obj\
$(XML_INTDIR_A)\uri.obj\
$(XML_INTDIR_A)\valid.obj\
$(XML_INTDIR_A)\xinclude.obj\
$(XML_INTDIR_A)\xlink.obj\
$(XML_INTDIR_A)\xmlIO.obj\
$(XML_INTDIR_A)\xmlmemory.obj\
2002-12-16 18:45:29 +00:00
$(XML_INTDIR_A)\xmlreader.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\xmlregexp.obj\
$(XML_INTDIR_A)\xmlmodule.obj\
$(XML_INTDIR_A)\xmlsave.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\xmlschemas.obj\
$(XML_INTDIR_A)\xmlschemastypes.obj\
$(XML_INTDIR_A)\xmlunicode.obj\
$(XML_INTDIR_A)\xmlwriter.obj\
2002-09-29 17:54:00 +00:00
$(XML_INTDIR_A)\xpath.obj\
$(XML_INTDIR_A)\xpointer.obj\
$(XML_INTDIR_A)\xmlstring.obj
2002-09-29 17:54:00 +00:00
# Static libxml object files.
XML_OBJS_A_DLL = $(XML_INTDIR_A_DLL)\buf.obj\
$(XML_INTDIR_A_DLL)\c14n.obj\
$(XML_INTDIR_A_DLL)\catalog.obj\
$(XML_INTDIR_A_DLL)\chvalid.obj\
$(XML_INTDIR_A_DLL)\debugXML.obj\
$(XML_INTDIR_A_DLL)\dict.obj\
$(XML_INTDIR_A_DLL)\encoding.obj\
$(XML_INTDIR_A_DLL)\entities.obj\
$(XML_INTDIR_A_DLL)\error.obj\
$(XML_INTDIR_A_DLL)\globals.obj\
$(XML_INTDIR_A_DLL)\hash.obj\
$(XML_INTDIR_A_DLL)\HTMLparser.obj\
$(XML_INTDIR_A_DLL)\HTMLtree.obj\
$(XML_INTDIR_A_DLL)\legacy.obj\
$(XML_INTDIR_A_DLL)\list.obj\
$(XML_INTDIR_A_DLL)\nanoftp.obj\
$(XML_INTDIR_A_DLL)\nanohttp.obj\
$(XML_INTDIR_A_DLL)\parser.obj\
$(XML_INTDIR_A_DLL)\parserInternals.obj\
$(XML_INTDIR_A_DLL)\pattern.obj\
$(XML_INTDIR_A_DLL)\relaxng.obj\
$(XML_INTDIR_A_DLL)\SAX2.obj\
$(XML_INTDIR_A_DLL)\SAX.obj\
$(XML_INTDIR_A_DLL)\schematron.obj\
$(XML_INTDIR_A_DLL)\threads.obj\
$(XML_INTDIR_A_DLL)\tree.obj\
$(XML_INTDIR_A_DLL)\uri.obj\
$(XML_INTDIR_A_DLL)\valid.obj\
$(XML_INTDIR_A_DLL)\xinclude.obj\
$(XML_INTDIR_A_DLL)\xlink.obj\
$(XML_INTDIR_A_DLL)\xmlIO.obj\
$(XML_INTDIR_A_DLL)\xmlmemory.obj\
$(XML_INTDIR_A_DLL)\xmlreader.obj\
$(XML_INTDIR_A_DLL)\xmlregexp.obj\
$(XML_INTDIR_A_DLL)\xmlmodule.obj\
$(XML_INTDIR_A_DLL)\xmlsave.obj\
$(XML_INTDIR_A_DLL)\xmlschemas.obj\
$(XML_INTDIR_A_DLL)\xmlschemastypes.obj\
$(XML_INTDIR_A_DLL)\xmlunicode.obj\
$(XML_INTDIR_A_DLL)\xmlwriter.obj\
$(XML_INTDIR_A_DLL)\xpath.obj\
$(XML_INTDIR_A_DLL)\xpointer.obj\
$(XML_INTDIR_A_DLL)\xmlstring.obj
2018-11-06 10:17:35 +01:00
!if "$(WITH_LZMA)" == "1"
XML_OBJS = $(XML_OBJS) $(XML_INTDIR)\xzlib.obj
XML_OBJS_A = $(XML_OBJS_A) $(XML_INTDIR_A)\xzlib.obj
XML_OBJS_A_DLL = $(XML_OBJS_A_DLL) $(XML_INTDIR_A_DLL)\xzlib.obj
!endif
# Xmllint and friends executables.
UTILS = $(BINDIR)\xmllint.exe\
$(BINDIR)\xmlcatalog.exe\
$(BINDIR)\testModule.exe\
$(BINDIR)\runtest.exe\
$(BINDIR)\runsuite.exe\
$(BINDIR)\runxmlconf.exe\
2012-08-15 16:30:10 +10:00
$(BINDIR)\testapi.exe\
$(BINDIR)\testchar.exe\
$(BINDIR)\testdict.exe\
$(BINDIR)\testlimits.exe\
$(BINDIR)\testrecurse.exe
!if "$(WITH_THREADS)" != "no"
UTILS = $(UTILS) $(BINDIR)\testThreads.exe
!endif
!if "$(VCMANIFEST)" == "1"
_VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
_VC_MANIFEST_EMBED_DLL= if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
!else
_VC_MANIFEST_EMBED_EXE=
_VC_MANIFEST_EMBED_DLL=
!endif
all : libxml libxmla libxmladll utils
2002-09-29 17:54:00 +00:00
libxml : $(BINDIR)\$(XML_SO)
libxmla : $(BINDIR)\$(XML_A)
libxmladll : $(BINDIR)\$(XML_A_DLL)
utils : $(UTILS)
clean :
if exist $(XML_INTDIR) rmdir /S /Q $(XML_INTDIR)
2002-09-29 17:54:00 +00:00
if exist $(XML_INTDIR_A) rmdir /S /Q $(XML_INTDIR_A)
if exist $(XML_INTDIR_A_DLL) rmdir /S /Q $(XML_INTDIR_A_DLL)
if exist $(UTILS_INTDIR) rmdir /S /Q $(UTILS_INTDIR)
if exist $(BINDIR) rmdir /S /Q $(BINDIR)
distclean : clean
if exist config.* del config.*
if exist Makefile del Makefile
rebuild : clean all
2005-04-06 21:14:06 +00:00
install-libs : all
Various "make distcheck" and portability fixups Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
if not exist $(INCPREFIX)\libxml2 mkdir $(INCPREFIX)\libxml2
if not exist $(INCPREFIX)\libxml2\libxml mkdir $(INCPREFIX)\libxml2\libxml
if not exist $(BINPREFIX) mkdir $(BINPREFIX)
if not exist $(LIBPREFIX) mkdir $(LIBPREFIX)
if not exist $(SOPREFIX) mkdir $(SOPREFIX)
Various "make distcheck" and portability fixups Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
2012-08-06 11:32:54 +08:00
copy $(XML_SRCDIR)\include\libxml\*.h $(INCPREFIX)\libxml2\libxml
copy $(BINDIR)\$(XML_SO) $(SOPREFIX)
copy $(BINDIR)\$(XML_A) $(LIBPREFIX)
copy $(BINDIR)\$(XML_A_DLL) $(LIBPREFIX)
copy $(BINDIR)\$(XML_IMP) $(LIBPREFIX)
2005-04-06 21:14:06 +00:00
install : install-libs
copy $(BINDIR)\*.exe $(BINPREFIX)
-copy $(BINDIR)\*.pdb $(BINPREFIX)
2005-04-06 21:14:06 +00:00
install-dist : install-libs
copy $(BINDIR)\xml*.exe $(BINPREFIX)
2005-04-06 21:14:06 +00:00
-copy $(BINDIR)\xml*.pdb $(BINPREFIX)
# This is a target for me, to make a binary distribution. Not for the public use,
# keep your hands off :-)
BDVERSION = $(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION).$(LIBXML_MICRO_VERSION)
BDPREFIX = $(XML_BASENAME)-$(BDVERSION).win32
bindist : all
2005-04-06 21:14:06 +00:00
$(MAKE) /nologo PREFIX=$(BDPREFIX) SOPREFIX=$(BDPREFIX)\bin install-dist
cscript //NoLogo configure.js genreadme $(XML_BASENAME) $(BDVERSION) $(BDPREFIX)\readme.txt
# Makes the output directory.
$(BINDIR) :
if not exist $(BINDIR) mkdir $(BINDIR)
# Makes the libxml intermediate directory.
$(XML_INTDIR) :
if not exist $(XML_INTDIR) mkdir $(XML_INTDIR)
2002-09-29 17:54:00 +00:00
# Makes the static libxml intermediate directory.
$(XML_INTDIR_A) :
if not exist $(XML_INTDIR_A) mkdir $(XML_INTDIR_A)
# Makes the static for dll libxml intermediate directory.
$(XML_INTDIR_A_DLL) :
if not exist $(XML_INTDIR_A_DLL) mkdir $(XML_INTDIR_A_DLL)
# An implicit rule for libxml compilation.
{$(XML_SRCDIR)}.c{$(XML_INTDIR)}.obj::
$(CC) $(CFLAGS) /Fo$(XML_INTDIR)\ /c $<
2002-09-29 17:54:00 +00:00
# An implicit rule for static libxml compilation.
{$(XML_SRCDIR)}.c{$(XML_INTDIR_A)}.obj::
$(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /c $<
# An implicit rule for static for dll libxml compilation.
{$(XML_SRCDIR)}.c{$(XML_INTDIR_A_DLL)}.obj::
$(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXML_STATIC_FOR_DLL" /Fo$(XML_INTDIR_A_DLL)\ /c $<
# Compiles libxml source. Uses the implicit rule for commands.
$(XML_OBJS) : $(XML_INTDIR)
2002-09-29 17:54:00 +00:00
# Compiles static libxml source. Uses the implicit rule for commands.
$(XML_OBJS_A) : $(XML_INTDIR_A)
# Compiles static for dll libxml source. Uses the implicit rule for commands.
$(XML_OBJS_A_DLL) : $(XML_INTDIR_A_DLL)
# Creates the export definition file (DEF) for libxml.
$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR) $(XML_DEF).src
$(CPP) $(CPPFLAGS) $(XML_DEF).src > $(XML_INTDIR)\$(XML_DEF)
$(XML_INTDIR)\$(XML_RES) : $(XML_INTDIR) libxml2.rc
rc -Fo $(XML_INTDIR)\$(XML_RES) libxml2.rc
# Creates the libxml shared object.
$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF) $(XML_INTDIR)\$(XML_RES)
2003-08-25 09:05:12 +00:00
$(LD) $(LDFLAGS) /DLL \
/IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(XML_INTDIR)\$(XML_RES) $(LIBS)
@$(_VC_MANIFEST_EMBED_DLL)
2003-08-25 09:05:12 +00:00
#$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
# $(LD) $(LDFLAGS) /DLL /DEF:$(XML_INTDIR)\$(XML_DEF) \
# /IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
# Creates the libxml archive.
2002-09-29 17:54:00 +00:00
$(BINDIR)\$(XML_A) : $(BINDIR) $(XML_OBJS_A)
$(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A) $(XML_OBJS_A)
# Creates the libxml static for dll archive.
$(BINDIR)\$(XML_A_DLL) : $(BINDIR) $(XML_OBJS_A_DLL)
$(AR) $(ARFLAGS) /OUT:$(BINDIR)\$(XML_A_DLL) $(XML_OBJS_A_DLL)
# Makes the utils intermediate directory.
$(UTILS_INTDIR) :
if not exist $(UTILS_INTDIR) mkdir $(UTILS_INTDIR)
# An implicit rule for xmllint and friends.
!if "$(STATIC)" == "1"
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
$(CC) /D "LIBXML_STATIC" $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
$(LD) $(LDFLAGS) /OUT:$@ $(XML_A) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
@$(_VC_MANIFEST_EMBED_EXE)
!else
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
$(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
$(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
@$(_VC_MANIFEST_EMBED_EXE)
!endif
# Builds xmllint and friends. Uses the implicit rule for commands.
$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla libxmladll
# Source dependences should be autogenerated somehow here, but how to
# do it? I have no clue.
# TESTS
tests : checktests XPathtests
checktests : $(UTILS)
cd .. && win32\$(BINDIR)\runtest.exe
cd .. && win32\$(BINDIR)\testrecurse.exe
cd .. && win32\$(BINDIR)\testapi.exe
cd .. && win32\$(BINDIR)\testchar.exe
cd .. && win32\$(BINDIR)\testdict.exe
cd .. && win32\$(BINDIR)\runxmlconf.exe