xref: /aoo41x/main/libxml2/makefile.mk (revision cdf0e10c)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28PRJ=.
29
30PRJNAME=libxml2
31TARGET=so_libxml2
32
33# --- Settings -----------------------------------------------------
34
35.INCLUDE :	settings.mk
36
37.IF "$(SYSTEM_LIBXML)" == "YES"
38all:
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
42
43# --- Files --------------------------------------------------------
44
45LIBXML2VERSION=2.7.6
46
47TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
48TARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2
49
50# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
51PATCH_FILES=libxml2-configure.patch \
52            libxml2-mingw.patch \
53            libxml2-gnome599717.patch \
54            libxml2-xpath.patch \
55            libxml2-global-symbols.patch \
56
57.IF "$(OS)" == "WNT"
58PATCH_FILES+= libxml2-long-path.patch
59.ENDIF
60
61# This is only for UNX environment now
62
63.IF "$(OS)"=="WNT"
64.IF "$(COM)"=="GCC"
65xml2_CC=$(CC) -mthreads
66.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
67xml2_CC+=-shared-libgcc
68.ENDIF
69xml2_LIBS=-lws2_32
70.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
71xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
72.ENDIF
73CONFIGURE_DIR=
74CONFIGURE_ACTION=.$/configure
75CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --without-debug --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(xml2_CC)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xml2_LIBS)" OBJDUMP=objdump
76BUILD_ACTION=$(GNUMAKE)
77BUILD_DIR=$(CONFIGURE_DIR)
78.ELSE
79CONFIGURE_DIR=win32
80CONFIGURE_ACTION=cscript configure.js
81CONFIGURE_FLAGS=iconv=no sax1=yes
82.IF "$(debug)"!=""
83CONFIGURE_FLAGS+=debug=yes
84.ENDIF
85BUILD_ACTION=nmake
86BUILD_DIR=$(CONFIGURE_DIR)
87.ENDIF
88.ELSE
89.IF "$(SYSBASE)"!=""
90xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
91.IF "$(COMNAME)"=="sunpro5"
92xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
93.ENDIF			# "$(COMNAME)"=="sunpro5"
94xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
95.ENDIF			# "$(SYSBASE)"!=""
96
97CONFIGURE_DIR=
98.IF "$(OS)"=="OS2"
99CONFIGURE_ACTION=sh .$/configure
100CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
101.ELSE
102CONFIGURE_ACTION=.$/configure
103CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
104.ENDIF
105BUILD_ACTION=$(GNUMAKE)
106BUILD_FLAGS+= -j$(EXTMAXPROCESS)
107BUILD_DIR=$(CONFIGURE_DIR)
108.ENDIF
109
110
111OUTDIR2INC=include$/libxml
112
113.IF "$(OS)"=="MACOSX"
114EXTRPATH=URELIB
115OUT2LIB+=.libs$/libxml2.*.dylib
116OUT2BIN+=.libs$/xmllint
117OUT2BIN+=xml2-config
118.ELIF "$(OS)"=="WNT"
119.IF "$(COM)"=="GCC"
120OUT2LIB+=.libs$/libxml2*.a
121OUT2BIN+=.libs$/libxml2*.dll
122OUT2BIN+=.libs$/xmllint.exe
123OUT2BIN+=xml2-config
124.ELSE
125OUT2LIB+=win32$/bin.msvc$/*.lib
126OUT2BIN+=win32$/bin.msvc$/*.dll
127OUT2BIN+=win32$/bin.msvc$/xmllint.exe
128.ENDIF
129.ELSE
130OUT2LIB+=.libs$/libxml2.so*
131OUT2BIN+=.libs$/xmllint
132OUT2BIN+=xml2-config
133.ENDIF
134
135# --- Targets ------------------------------------------------------
136
137.INCLUDE : set_ext.mk
138.INCLUDE : target.mk
139.INCLUDE : tg_ext.mk
140
141