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 BUILD_DIR
=$(CONFIGURE_DIR
)
105 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
106 LDFLAGS
:=-Wl
,-z
,origin -Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl
,-noinhibit-exec
107 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
108 .IF
"$(OS)$(COM)"=="SOLARISC52"
109 LDFLAGS
:=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
110 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
112 LDFLAGS
+:=$(LINKFLAGS
) $(LINKFLAGSRUNPATH_OOO
)
116 CPPFLAGS
+:=-I
$(SOLARINCDIR
)$/external
-I
$(SYSBASE
)$/usr
$/include $(EXTRA_CFLAGS
)
117 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
118 LDFLAGS
+:=-L
$(SOLARLIBDIR
) -L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-lpthread
-ldl
120 .ENDIF
# "$(SYSBASE)"!=""
126 .IF
"$(COMNAME)"=="sunpro5"
127 CPPFLAGS
+:=$(ARCH_FLAGS
) -xc99
=none
128 .ENDIF
# "$(COMNAME)"=="sunpro5"
131 CONFIGURE_ACTION
=.
$/configure
133 .IF
"$(DISABLE_DYNLOADING)" == "TRUE"
135 CONFIGURE_ACTION
+=LIBS
=-liconv
137 CONFIGURE_FLAGS
=--disable-shared
139 CONFIGURE_FLAGS
=--disable-static
142 .IF
"$(SYSTEM_LIBXML)"!="YES"
143 # Use the xml2-config from our own libxml2 copy
144 CONFIGURE_FLAGS
+=--with-libxml-prefix
=$(SOLARVER
)/$(INPATH
)
147 CONFIGURE_FLAGS
+=--enable-ipv6
=no
--without-crypto
--without-python
--with-sax1
=yes
149 .IF
"$(CROSS_COMPILING)"=="YES"
150 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
153 .IF
"$(OS)" == "MACOSX"
155 --prefix=/@.__________________________________________________
$(EXTRPATH
)
158 BUILD_ACTION
=chmod
777 xslt-config
&& $(GNUMAKE
)
159 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
160 BUILD_DIR
=$(CONFIGURE_DIR
)
164 OUT2INC
+=libexslt
$/*.h
166 .IF
"$(OS)"=="MACOSX"
167 OUT2LIB
+=libxslt
$/.libs
$/libxslt.
*.dylib
168 OUT2LIB
+=libexslt
$/.libs
$/libexslt.
*.dylib
169 OUT2BIN_NONE
+=xsltproc
$/.libs
$/xsltproc
171 .ELIF
"$(DISABLE_DYNLOADING)" == "TRUE"
172 OUT2LIB
+=libxslt
$/.libs
$/libxslt.a
173 OUT2LIB
+=libexslt
$/.libs
$/libexslt.a
177 OUT2LIB
+=libxslt
$/.libs
$/*.a
178 OUT2LIB
+=libexslt
$/.libs
$/*.a
179 OUT2BIN
+=libxslt
$/.libs
$/*.dll
180 OUT2BIN
+=libexslt
$/.libs
$/*.dll
181 OUT2BIN
+=xsltproc
$/.libs
$/*.exe
*
184 OUT2LIB
+=win32
$/bin.msvc
$/*.lib
185 OUT2BIN
+=win32
$/bin.msvc
$/*.dll
186 OUT2BIN
+=win32
$/bin.msvc
$/*.exe
189 OUT2LIB
+=libxslt
$/.libs
$/libxslt.so
*
190 OUT2LIB
+=libexslt
$/.libs
$/libexslt.so
*
191 OUT2BIN
+=xsltproc
$/.libs
$/xsltproc
195 # --- Targets ------------------------------------------------------
196 .ENDIF
# L10N_framework
197 .INCLUDE
: set_ext.mk