xref: /aoo41x/main/libxslt/makefile.mk (revision 2d019523)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=.
25
26PRJNAME=libxslt
27TARGET=so_libxslt
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :	settings.mk
32
33.IF "$(SYSTEM_LIBXSLT)" == "YES"
34all:
35	@echo "An already available installation of libxslt should exist on your system."
36	@echo "Therefore the version provided here does not need to be built in addition."
37.ENDIF
38
39# --- Files --------------------------------------------------------
40
41.IF "$(L10N_framework)"==""
42
43.INCLUDE :	libxsltversion.mk
44
45LIBXSLTVERSION=$(LIBXSLT_MAJOR).$(LIBXSLT_MINOR).$(LIBXSLT_MICRO)
46
47TARFILE_NAME=$(PRJNAME)-$(LIBXSLTVERSION)
48TARFILE_MD5=1fc72f98e98bf4443f1651165f3aa146
49
50# libxslt-internal-symbols: #i112480#: Solaris ld requires symbols to be defined
51PATCH_FILES=libxslt-configure.patch \
52            libxslt-win_manifest.patch \
53            libxslt-CVE-2015-7995.patch
54
55
56
57# This is only for UNX environment now
58.IF "$(OS)"=="WNT"
59.IF "$(COM)"=="GCC"
60xslt_CC=$(CC) -mthreads
61.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
62xslt_CC+=-shared-libgcc
63.ENDIF
64xslt_LIBS=
65.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
66xslt_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
67.ENDIF
68CONFIGURE_DIR=
69CONFIGURE_ACTION=.$/configure
70CONFIGURE_FLAGS=--without-crypto --without-python --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xslt_CC)" CFLAGS="$(xslt_CFLAGS)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xslt_LIBS)"  LIBXML2LIB=$(LIBXML2LIB) OBJDUMP=objdump
71BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
72BUILD_FLAGS+= -j$(EXTMAXPROCESS)
73BUILD_DIR=$(CONFIGURE_DIR)
74.IF "$(GUI)$(COM)"=="WNTGCC"
75.EXPORT : PWD
76.ENDIF
77.ELSE
78CONFIGURE_DIR=win32
79CONFIGURE_ACTION=cscript configure.js
80#CONFIGURE_FLAGS=iconv=no sax1=yes
81.IF "$(debug)"!=""
82CONFIGURE_FLAGS+=debug=yes
83.ENDIF
84BUILD_ACTION=nmake
85BUILD_DIR=$(CONFIGURE_DIR)
86.ENDIF
87.ELSE
88
89.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
90LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
91.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
92.IF "$(OS)$(COM)"=="SOLARISC52"
93LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
94.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
95
96.IF "$(SYSBASE)"!=""
97CPPFLAGS+:=-I$(SOLARINCDIR)$/external -I$(SYSBASE)$/usr$/include $(EXTRA_CFLAGS)
98.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
99LDFLAGS+:=-L$(SOLARLIBDIR) -L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
100.ENDIF
101.ENDIF			# "$(SYSBASE)"!=""
102
103.EXPORT: CPPFLAGS
104.EXPORT: LDFLAGS
105.EXPORT: LIBXML2LIB
106
107.IF "$(COMNAME)"=="sunpro5"
108CPPFLAGS+:=$(ARCH_FLAGS) -xc99=none
109.ENDIF                  # "$(COMNAME)"=="sunpro5"
110CONFIGURE_DIR=
111CONFIGURE_ACTION=.$/configure
112CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=no --with-sax1=yes ac_cv_func_clock_gettime=false
113BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
114BUILD_FLAGS+= -j$(EXTMAXPROCESS)
115BUILD_DIR=$(CONFIGURE_DIR)
116.ENDIF
117
118OUT2INC=libxslt$/*.h
119
120.IF "$(OS)"=="MACOSX"
121OUT2LIB+=libxslt$/.libs$/libxslt.*.dylib
122OUT2LIB+=libexslt$/.libs$/libexslt.*.dylib
123OUT2BIN+=xsltproc$/.libs$/xsltproc
124OUT2BIN+=xslt-config
125.ELIF "$(OS)"=="WNT"
126.IF "$(COM)"=="GCC"
127OUT2LIB+=libxslt$/.libs$/*.a
128OUT2LIB+=libexslt$/.libs$/*.a
129OUT2BIN+=libxslt$/.libs$/*.dll
130OUT2BIN+=libexslt$/.libs$/*.dll
131OUT2BIN+=xsltproc$/.libs$/*.exe*
132OUT2BIN+=xslt-config
133.ELSE
134OUT2LIB+=win32$/bin.msvc$/*.lib
135OUT2BIN+=win32$/bin.msvc$/*.dll
136OUT2BIN+=win32$/bin.msvc$/*.exe
137.ENDIF
138.ELSE
139OUT2LIB+=libxslt$/.libs$/libxslt.so*
140OUT2LIB+=libexslt$/.libs$/libexslt.so*
141OUT2BIN+=xsltproc$/.libs$/xsltproc
142OUT2BIN+=xslt-config
143.ENDIF
144
145# --- Targets ------------------------------------------------------
146.ENDIF 			# L10N_framework
147.INCLUDE : set_ext.mk
148.INCLUDE : target.mk
149.INCLUDE : tg_ext.mk
150
151