1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
33 # --- Settings -----------------------------------------------------
35 .INCLUDE
: settings.mk
37 .IF
"$(SYSTEM_LIBXML)" == "YES"
39 @echo
"An already available installation of libxml should exist on your system."
40 @echo
"Therefore the version provided here does not need to be built in addition."
43 # --- Files --------------------------------------------------------
47 TARFILE_NAME
=$(PRJNAME
)-$(LIBXML2VERSION
)
48 TARFILE_MD5
=7740a8ec23878a2f50120e1faa2730f2
50 # libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
51 PATCH_FILES
=libxml2-configure.patch \
52 libxml2-gnome599717.patch \
54 libxml2-global-symbols.patch \
60 PATCH_FILES
+= libxml2-long-path.patch
62 PATCH_FILES
+= libxml2-mingw.patch
66 .IF
"$(OS)"=="ANDROID"
67 PATCH_FILES
+= libxml2-android.patch
70 # This is only for UNX environment now
74 xml2_CC
=$(CC
) -mthreads
75 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
76 xml2_CC
+=-shared-libgcc
79 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
80 xml2_LIBS
+=$(MINGW_SHARED_LIBSTDCPP
)
83 CONFIGURE_ACTION
=.
$/configure
84 .IF
"$(CROSS_COMPILING)"=="YES"
85 BUILD_AND_HOST
=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
87 BUILD_AND_HOST
=--build
=i586-pc-mingw32
--host
=i586-pc-mingw32
92 CONF_ILIB
=-L
$(ILIB
:s
/;/ -L
/)
94 CONFIGURE_FLAGS
=--enable-ipv6
=no
--without-python
--without-zlib
--enable-static
=no
--without-debug
$(BUILD_AND_HOST
) lt_cv_cc_dll_switch
="-shared" CC
="$(xml2_CC)" LDFLAGS
="-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 $(CONF_ILIB)" LIBS
="$(xml2_LIBS)" OBJDUMP
=objdump
95 BUILD_ACTION
=$(GNUMAKE
)
96 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
97 BUILD_DIR
=$(CONFIGURE_DIR
)
100 CONFIGURE_ACTION
=cscript configure.js
101 CONFIGURE_FLAGS
=iconv
=no sax1
=yes
103 BUILD_DIR
=$(CONFIGURE_DIR
)
113 xml2_CFLAGS
+=$(ARCH_FLAGS
)
116 xml2_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
117 .IF
"$(COMNAME)"=="sunpro5"
118 xml2_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
119 .ENDIF
# "$(COMNAME)"=="sunpro5"
120 xml2_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
121 .ENDIF
# "$(SYSBASE)"!=""
124 CONFIGURE_ACTION
=.
$/configure
126 CONFIGURE_FLAGS
=--disable-shared
128 CONFIGURE_FLAGS
=--disable-static
130 CONFIGURE_FLAGS
+=--enable-ipv6
=no
--without-python
--without-zlib
--with-sax1
=yes CFLAGS
="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS
="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
131 BUILD_ACTION
=$(GNUMAKE
)
132 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
133 BUILD_DIR
=$(CONFIGURE_DIR
)
135 CONFIGURE_FLAGS
+=--with-mem-debug
--with-run-debug
137 .IF
"$(OS)" == "MACOSX"
139 --prefix=/@.__________________________________________________
$(EXTRPATH
)
141 .IF
"$(CROSS_COMPILING)"=="YES"
142 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
147 OUTDIR2INC
=include$/libxml
149 .IF
"$(OS)"=="MACOSX"
151 OUT2LIB
+=.libs
$/libxml2.
*.dylib
152 OUT2BIN_NONE
+=.libs
$/xmllint
155 OUT2LIB
+=.libs
$/libxml2.a
159 OUT2LIB
+=.libs
$/libxml2
*.a
160 OUT2BIN
+=.libs
$/xmllint.exe
163 OUT2LIB
+=win32
$/bin.msvc
$/*.lib
164 OUT2BIN
+=win32
$/bin.msvc
$/*.dll
165 OUT2BIN
+=win32
$/bin.msvc
$/xmllint.exe
168 OUT2LIB
+=.libs
$/libxml2.so
*
169 OUT2BIN
+=.libs
$/xmllint
173 # --- Targets ------------------------------------------------------
175 .INCLUDE
: set_ext.mk