xref: /trunk/main/libxslt/makefile.mk (revision 193e2a48)
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=b3bd254a03e46d58f8ad1e4559cd2c2f
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-backup_Xpath_context.patch \
54            libxslt-CVE-2019-11068.patch \
55            libxslt-CVE-2019-13117.patch \
56            libxslt-CVE-2019-13118.patch
57
58
59
60# This is only for UNX environment now
61.IF "$(OS)"=="WNT"
62.IF "$(COM)"=="GCC"
63xslt_CC=$(CC) -mthreads
64.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
65xslt_CC+=-shared-libgcc
66.ENDIF
67xslt_LIBS=
68.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
69xslt_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
70.ENDIF
71CONFIGURE_DIR=
72CONFIGURE_ACTION=.$/configure
73CONFIGURE_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
74BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
75BUILD_FLAGS+= -j$(EXTMAXPROCESS)
76BUILD_DIR=$(CONFIGURE_DIR)
77.IF "$(GUI)$(COM)"=="WNTGCC"
78.EXPORT : PWD
79.ENDIF
80.ELSE
81CONFIGURE_DIR=win32
82CONFIGURE_ACTION=cscript configure.js
83#CONFIGURE_FLAGS=iconv=no sax1=yes
84.IF "$(debug)"!=""
85CONFIGURE_FLAGS+=debug=yes
86.ENDIF
87BUILD_ACTION=nmake
88BUILD_DIR=$(CONFIGURE_DIR)
89.ENDIF
90.ELSE
91
92.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
93LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
94.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
95.IF "$(OS)$(COM)"=="SOLARISC52"
96LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
97.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
98
99.IF "$(SYSBASE)"!=""
100CPPFLAGS+:=-I$(SOLARINCDIR)$/external -I$(SYSBASE)$/usr$/include $(EXTRA_CFLAGS)
101.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
102LDFLAGS+:=-L$(SOLARLIBDIR) -L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
103.ENDIF
104.ENDIF			# "$(SYSBASE)"!=""
105
106.EXPORT: CPPFLAGS
107.EXPORT: LDFLAGS
108.EXPORT: LIBXML2LIB
109
110.IF "$(COMNAME)"=="sunpro5"
111CPPFLAGS+:=$(ARCH_FLAGS) -xc99=none
112.ENDIF                  # "$(COMNAME)"=="sunpro5"
113CONFIGURE_DIR=
114CONFIGURE_ACTION=.$/configure
115CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=no --with-sax1=yes ac_cv_func_clock_gettime=false
116BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
117BUILD_FLAGS+= -j$(EXTMAXPROCESS)
118BUILD_DIR=$(CONFIGURE_DIR)
119.ENDIF
120
121OUT2INC=libxslt$/*.h
122
123.IF "$(OS)"=="MACOSX"
124OUT2LIB+=libxslt$/.libs$/libxslt.*.dylib
125OUT2LIB+=libexslt$/.libs$/libexslt.*.dylib
126OUT2BIN+=xsltproc$/.libs$/xsltproc
127OUT2BIN+=xslt-config
128.ELIF "$(OS)"=="WNT"
129.IF "$(COM)"=="GCC"
130OUT2LIB+=libxslt$/.libs$/*.a
131OUT2LIB+=libexslt$/.libs$/*.a
132OUT2BIN+=libxslt$/.libs$/*.dll
133OUT2BIN+=libexslt$/.libs$/*.dll
134OUT2BIN+=xsltproc$/.libs$/*.exe*
135OUT2BIN+=xslt-config
136.ELSE
137OUT2LIB+=win32$/bin.msvc$/*.lib
138OUT2BIN+=win32$/bin.msvc$/*.dll
139OUT2BIN+=win32$/bin.msvc$/*.exe
140.ENDIF
141.ELSE
142OUT2LIB+=libxslt$/.libs$/libxslt.so*
143OUT2LIB+=libexslt$/.libs$/libexslt.so*
144OUT2BIN+=xsltproc$/.libs$/xsltproc
145OUT2BIN+=xslt-config
146.ENDIF
147
148# --- Targets ------------------------------------------------------
149.ENDIF 			# L10N_framework
150.INCLUDE : set_ext.mk
151.INCLUDE : target.mk
152.INCLUDE : tg_ext.mk
153
154