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