Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / libxml2 / makefile.mk
blob6c7c0697f54092655ddc6f6073ead711e1dbf2c8
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 #*************************************************************************
28 PRJ=.
30 PRJNAME=libxml2
31 TARGET=so_libxml2
33 # --- Settings -----------------------------------------------------
35 .INCLUDE : settings.mk
37 .IF "$(SYSTEM_LIBXML)" == "YES"
38 all:
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."
41 .ENDIF
43 # --- Files --------------------------------------------------------
45 LIBXML2VERSION=2.7.6
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 \
53 libxml2-xpath.patch \
54 libxml2-global-symbols.patch \
55 libxml2-aix.patch \
56 libxml2-vc10.patch \
57 libxml2-latin.patch
59 .IF "$(OS)" == "WNT"
60 PATCH_FILES+= libxml2-long-path.patch
61 .IF "$(COM)"=="GCC"
62 PATCH_FILES+= libxml2-mingw.patch
63 .ENDIF
64 .ENDIF
66 .IF "$(OS)"=="ANDROID"
67 PATCH_FILES+= libxml2-android.patch
68 .ENDIF
70 # This is only for UNX environment now
72 .IF "$(OS)"=="WNT"
73 .IF "$(COM)"=="GCC"
74 xml2_CC=$(CC) -mthreads
75 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
76 xml2_CC+=-shared-libgcc
77 .ENDIF
78 xml2_LIBS=-lws2_32
79 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
80 xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
81 .ENDIF
82 CONFIGURE_DIR=
83 CONFIGURE_ACTION=.$/configure
84 .IF "$(CROSS_COMPILING)"=="YES"
85 BUILD_AND_HOST=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
86 .ELSE
87 BUILD_AND_HOST=--build=i586-pc-mingw32 --host=i586-pc-mingw32
88 .ENDIF
89 .IF "$(ILIB)" == ""
90 CONF_ILIB=
91 .ELSE
92 CONF_ILIB=-L$(ILIB:s/;/ -L/)
93 .ENDIF
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)
98 .ELSE
99 CONFIGURE_DIR=win32
100 CONFIGURE_ACTION=cscript configure.js
101 CONFIGURE_FLAGS=iconv=no sax1=yes
102 BUILD_ACTION=nmake
103 BUILD_DIR=$(CONFIGURE_DIR)
104 .ENDIF
105 .ELSE
107 .IF "$(debug)" != ""
108 xml2_CFLAGS+=-g
109 .ELSE
110 xml2_CFLAGS+=-O
111 .ENDIF
113 xml2_CFLAGS+=$(ARCH_FLAGS)
115 .IF "$(SYSBASE)"!=""
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)"!=""
123 CONFIGURE_DIR=
124 CONFIGURE_ACTION=.$/configure
125 .IF "$(OS)"=="IOS"
126 CONFIGURE_FLAGS=--disable-shared
127 .ELSE
128 CONFIGURE_FLAGS=--disable-static
129 .ENDIF
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)
134 .IF "$(debug)"!=""
135 CONFIGURE_FLAGS+=--with-mem-debug --with-run-debug
136 .ENDIF
137 .IF "$(OS)" == "MACOSX"
138 CONFIGURE_FLAGS += \
139 --prefix=/@.__________________________________________________$(EXTRPATH)
140 .END
141 .IF "$(CROSS_COMPILING)"=="YES"
142 CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
143 .ENDIF
144 .ENDIF
147 OUTDIR2INC=include$/libxml
149 .IF "$(OS)"=="MACOSX"
150 EXTRPATH=URELIB
151 OUT2LIB+=.libs$/libxml2.*.dylib
152 OUT2BIN_NONE+=.libs$/xmllint
153 OUT2BIN+=xml2-config
154 .ELIF "$(OS)"=="IOS"
155 OUT2LIB+=.libs$/libxml2.a
156 OUT2BIN+=xml2-config
157 .ELIF "$(OS)"=="WNT"
158 .IF "$(COM)"=="GCC"
159 OUT2LIB+=.libs$/libxml2*.a
160 OUT2BIN+=.libs$/xmllint.exe
161 OUT2BIN+=xml2-config
162 .ELSE
163 OUT2LIB+=win32$/bin.msvc$/*.lib
164 OUT2BIN+=win32$/bin.msvc$/*.dll
165 OUT2BIN+=win32$/bin.msvc$/xmllint.exe
166 .ENDIF
167 .ELSE
168 OUT2LIB+=.libs$/libxml2.so*
169 OUT2BIN+=.libs$/xmllint
170 OUT2BIN+=xml2-config
171 .ENDIF
173 # --- Targets ------------------------------------------------------
175 .INCLUDE : set_ext.mk
176 .INCLUDE : target.mk
177 .INCLUDE : tg_ext.mk