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