Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / libxslt / makefile.mk
blob1ff05d6fbbcbe318ff1b43aca85d07b160475362
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=libxslt
31 TARGET=so_libxslt
33 # --- Settings -----------------------------------------------------
35 .INCLUDE : settings.mk
37 .IF "$(SYSTEM_LIBXSLT)" == "YES"
38 all:
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."
41 .ENDIF
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 \
57 libxslt-mingw.patch \
58 libxslt-internal-symbols.patch \
59 libxslt-aix.patch \
60 libxslt-vc10.patch
62 .IF "$(OS)"=="ANDROID"
63 PATCH_FILES+= libxslt-android.patch
64 .ENDIF
66 # This is only for UNX environment now
67 .IF "$(OS)"=="WNT"
68 .IF "$(COM)"=="GCC"
69 xslt_CC=$(CC) -mthreads
70 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
71 xslt_CC+=-shared-libgcc
72 .ENDIF
73 xslt_LIBS=
74 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
75 xslt_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
76 .ENDIF
77 CONFIGURE_DIR=
78 CONFIGURE_ACTION=.$/configure
79 .IF "$(CROSS_COMPILING)"=="YES"
80 BUILD_AND_HOST=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
81 .ELSE
82 BUILD_AND_HOST=--build=i586-pc-mingw32 --host=i586-pc-mingw32
83 .ENDIF
84 .IF "$(ILIB)" == ""
85 CONF_ILIB=
86 .ELSE
87 CONF_ILIB=-L$(ILIB:s/;/ -L/)
88 .ENDIF
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"
94 .EXPORT : PWD
95 .ENDIF
96 .ELSE
97 CONFIGURE_DIR=win32
98 CONFIGURE_ACTION=cscript configure.js
99 #CONFIGURE_FLAGS=iconv=no sax1=yes
100 BUILD_ACTION=nmake
101 BUILD_DIR=$(CONFIGURE_DIR)
102 .ENDIF
103 .ELSE
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"
111 .IF "$(OS)"=="AIX"
112 LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
113 .ENDIF
115 .IF "$(SYSBASE)"!=""
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
119 .ENDIF
120 .ENDIF # "$(SYSBASE)"!=""
122 .EXPORT: CPPFLAGS
123 .EXPORT: LDFLAGS
124 .EXPORT: LIBXML2LIB
126 .IF "$(COMNAME)"=="sunpro5"
127 CPPFLAGS+:=$(ARCH_FLAGS) -xc99=none
128 .ENDIF # "$(COMNAME)"=="sunpro5"
130 CONFIGURE_DIR=
131 CONFIGURE_ACTION=.$/configure
133 .IF "$(DISABLE_DYNLOADING)" == "TRUE"
134 .IF "$(OS)" == "IOS"
135 CONFIGURE_ACTION+=LIBS=-liconv
136 .ENDIF
137 CONFIGURE_FLAGS=--disable-shared
138 .ELSE
139 CONFIGURE_FLAGS=--disable-static
140 .ENDIF
142 .IF "$(SYSTEM_LIBXML)"!="YES"
143 # Use the xml2-config from our own libxml2 copy
144 CONFIGURE_FLAGS+=--with-libxml-prefix=$(SOLARVER)/$(INPATH)
145 .ENDIF
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)
151 .ENDIF
153 .IF "$(OS)" == "MACOSX"
154 CONFIGURE_FLAGS += \
155 --prefix=/@.__________________________________________________$(EXTRPATH)
156 .ENDIF
158 BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
159 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
160 BUILD_DIR=$(CONFIGURE_DIR)
161 .ENDIF
163 OUT2INC=libxslt$/*.h
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
170 OUT2BIN+=xslt-config
171 .ELIF "$(DISABLE_DYNLOADING)" == "TRUE"
172 OUT2LIB+=libxslt$/.libs$/libxslt.a
173 OUT2LIB+=libexslt$/.libs$/libexslt.a
174 OUT2BIN+=xslt-config
175 .ELIF "$(OS)"=="WNT"
176 .IF "$(COM)"=="GCC"
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*
182 OUT2BIN+=xslt-config
183 .ELSE
184 OUT2LIB+=win32$/bin.msvc$/*.lib
185 OUT2BIN+=win32$/bin.msvc$/*.dll
186 OUT2BIN+=win32$/bin.msvc$/*.exe
187 .ENDIF
188 .ELSE
189 OUT2LIB+=libxslt$/.libs$/libxslt.so*
190 OUT2LIB+=libexslt$/.libs$/libexslt.so*
191 OUT2BIN+=xsltproc$/.libs$/xsltproc
192 OUT2BIN+=xslt-config
193 .ENDIF
195 # --- Targets ------------------------------------------------------
196 .ENDIF # L10N_framework
197 .INCLUDE : set_ext.mk
198 .INCLUDE : target.mk
199 .INCLUDE : tg_ext.mk