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_LIBXSLT)" == "YES"
39 @echo
"An already available installation of libxslt should exist on your system."
40 @echo
"Therefore the version provided here does not need to be built in addition."
43 # --- Files --------------------------------------------------------
45 .IF
"$(L10N_framework)"==""
47 .INCLUDE
: libxsltversion.mk
49 LIBXSLTVERSION
=$(LIBXSLT_MAJOR
).
$(LIBXSLT_MINOR
).
$(LIBXSLT_MICRO
)
51 TARFILE_NAME
=$(PRJNAME
)-$(LIBXSLTVERSION
)
52 TARFILE_MD5
=e61d0364a30146aaa3001296f853b2b9
54 # libxslt-internal-symbols: #i112480#: Solaris ld requires symbols to be defined
55 PATCH_FILES
=libxslt-configure.patch \
56 libxslt-win_manifest.patch \
58 libxslt-internal-symbols.patch \
62 .IF
"$(OS)"=="ANDROID"
63 PATCH_FILES
+= libxslt-android.patch
66 # This is only for UNX environment now
69 xslt_CC
=$(CC
) -mthreads
70 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
71 xslt_CC
+=-shared-libgcc
74 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
75 xslt_LIBS
+=$(MINGW_SHARED_LIBSTDCPP
)
78 CONFIGURE_ACTION
=.
$/configure
79 .IF
"$(CROSS_COMPILING)"=="YES"
80 BUILD_AND_HOST
=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
82 BUILD_AND_HOST
=--build
=i586-pc-mingw32
--host
=i586-pc-mingw32
87 CONF_ILIB
=-L
$(ILIB
:s
/;/ -L
/)
89 CONFIGURE_FLAGS
=--without-crypto
--without-python
--enable-static
=no
$(BUILD_AND_HOST
) CC
="$(xslt_CC)" CFLAGS
="$(xslt_CFLAGS)" LDFLAGS
="-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 $(CONF_ILIB)" LIBS
="$(xslt_LIBS)" LIBXML2LIB
=$(LIBXML2LIB
) OBJDUMP
=objdump
90 BUILD_ACTION
=chmod
777 xslt-config
&& $(GNUMAKE
)
91 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
92 BUILD_DIR
=$(CONFIGURE_DIR
)
93 .IF
"$(GUI)$(COM)"=="WNTGCC"
98 CONFIGURE_ACTION
=cscript configure.js
99 #CONFIGURE_FLAGS=iconv=no sax1=yes
101 CONFIGURE_FLAGS
+=debug
=yes
104 BUILD_DIR
=$(CONFIGURE_DIR
)
108 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
109 LDFLAGS
:=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl
,-noinhibit-exec
110 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
111 .IF
"$(OS)$(COM)"=="SOLARISC52"
112 LDFLAGS
:=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
113 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
115 LDFLAGS
+:=$(LINKFLAGS
) $(LINKFLAGSRUNPATH_OOO
)
119 CPPFLAGS
+:=-I
$(SOLARINCDIR
)$/external
-I
$(SYSBASE
)$/usr
$/include $(EXTRA_CFLAGS
)
120 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
121 LDFLAGS
+:=-L
$(SOLARLIBDIR
) -L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-lpthread
-ldl
123 .ENDIF
# "$(SYSBASE)"!=""
129 .IF
"$(COMNAME)"=="sunpro5"
130 CPPFLAGS
+:=$(ARCH_FLAGS
) -xc99
=none
131 .ENDIF
# "$(COMNAME)"=="sunpro5"
134 CONFIGURE_ACTION
=.
$/configure
137 CONFIGURE_ACTION
+=LIBS
=-liconv
138 CONFIGURE_FLAGS
=--disable-shared
140 CONFIGURE_FLAGS
=--disable-static
143 .IF
"$(SYSTEM_LIBXML)"!="YES"
144 # Use the xml2-config from our own libxml2 copy
145 CONFIGURE_FLAGS
+=--with-libxml-prefix
=$(SOLARVER
)/$(INPATH
)
148 CONFIGURE_FLAGS
+=--enable-ipv6
=no
--without-crypto
--without-python
--with-sax1
=yes
150 .IF
"$(CROSS_COMPILING)"=="YES"
151 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
154 BUILD_ACTION
=chmod
777 xslt-config
&& $(GNUMAKE
)
155 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
156 BUILD_DIR
=$(CONFIGURE_DIR
)
161 .IF
"$(OS)"=="MACOSX"
162 OUT2LIB
+=libxslt
$/.libs
$/libxslt.
*.dylib
163 OUT2LIB
+=libexslt
$/.libs
$/libexslt.
*.dylib
164 OUT2BIN
+=xsltproc
$/.libs
$/xsltproc
167 OUT2LIB
+=libxslt
$/.libs
$/libxslt.a
168 OUT2LIB
+=libexslt
$/.libs
$/libexslt.a
172 OUT2LIB
+=libxslt
$/.libs
$/*.a
173 OUT2LIB
+=libexslt
$/.libs
$/*.a
174 OUT2BIN
+=libxslt
$/.libs
$/*.dll
175 OUT2BIN
+=libexslt
$/.libs
$/*.dll
176 OUT2BIN
+=xsltproc
$/.libs
$/*.exe
*
179 OUT2LIB
+=win32
$/bin.msvc
$/*.lib
180 OUT2BIN
+=win32
$/bin.msvc
$/*.dll
181 OUT2BIN
+=win32
$/bin.msvc
$/*.exe
184 OUT2LIB
+=libxslt
$/.libs
$/libxslt.so
*
185 OUT2LIB
+=libexslt
$/.libs
$/libexslt.so
*
186 OUT2BIN
+=xsltproc
$/.libs
$/xsltproc
190 # --- Targets ------------------------------------------------------
191 .ENDIF
# L10N_framework
192 .INCLUDE
: set_ext.mk