merged tag ooo/OOO330_m14
[LibreOffice.git] / libxml2 / makefile.mk
blobbef2d43aa6e3e0022da8b4f4d840ad4f47c2412c
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-mingw.patch \
53 libxml2-gnome599717.patch \
54 libxml2-global-symbols.patch \
57 # This is only for UNX environment now
59 .IF "$(OS)"=="WNT"
60 .IF "$(COM)"=="GCC"
61 xml2_CC=$(CC) -mthreads
62 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
63 xml2_CC+=-shared-libgcc
64 .ENDIF
65 xml2_LIBS=-lws2_32
66 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
67 xml2_LIBS+=-lstdc++_s
68 .ENDIF
69 CONFIGURE_DIR=
70 CONFIGURE_ACTION=.$/configure
71 CONFIGURE_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
72 BUILD_ACTION=$(GNUMAKE)
73 BUILD_DIR=$(CONFIGURE_DIR)
74 .ELSE
75 CONFIGURE_DIR=win32
76 CONFIGURE_ACTION=cscript configure.js
77 CONFIGURE_FLAGS=iconv=no sax1=yes
78 .IF "$(debug)"!=""
79 CONFIGURE_FLAGS+=debug=yes
80 .ENDIF
81 BUILD_ACTION=nmake
82 BUILD_DIR=$(CONFIGURE_DIR)
83 .ENDIF
84 .ELSE
85 .IF "$(SYSBASE)"!=""
86 xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
87 .IF "$(COMNAME)"=="sunpro5"
88 xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
89 .ENDIF # "$(COMNAME)"=="sunpro5"
90 xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
91 .ENDIF # "$(SYSBASE)"!=""
93 .IF "$(OS)$(COM)"=="LINUXGCC"
94 xml2_LDFLAGS+=-Wl,-z,noexecstack
95 .ENDIF
97 CONFIGURE_DIR=
98 .IF "$(OS)"=="OS2"
99 CONFIGURE_ACTION=sh .$/configure
100 CONFIGURE_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
102 CONFIGURE_ACTION=.$/configure
103 CONFIGURE_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
105 BUILD_ACTION=$(GNUMAKE)
106 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
107 BUILD_DIR=$(CONFIGURE_DIR)
108 .ENDIF
111 OUTDIR2INC=include$/libxml
113 .IF "$(OS)"=="MACOSX"
114 EXTRPATH=URELIB
115 OUT2LIB+=.libs$/libxml2.*.dylib
116 OUT2BIN+=.libs$/xmllint
117 OUT2BIN+=xml2-config
118 .ELIF "$(OS)"=="WNT"
119 .IF "$(COM)"=="GCC"
120 OUT2LIB+=.libs$/libxml2*.a
121 OUT2BIN+=.libs$/libxml2*.dll
122 OUT2BIN+=.libs$/xmllint.exe
123 OUT2BIN+=xml2-config
124 .ELSE
125 OUT2LIB+=win32$/bin.msvc$/*.lib
126 OUT2BIN+=win32$/bin.msvc$/*.dll
127 OUT2BIN+=win32$/bin.msvc$/xmllint.exe
128 .ENDIF
129 .ELSE
130 OUT2LIB+=.libs$/libxml2.so*
131 OUT2BIN+=.libs$/xmllint
132 OUT2BIN+=xml2-config
133 .ENDIF
135 # --- Targets ------------------------------------------------------
137 .INCLUDE : set_ext.mk
138 .INCLUDE : target.mk
139 .INCLUDE : tg_ext.mk