xref: /trunk/main/libxml2/makefile.mk (revision d095bc29)
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=libxml2
27TARGET=so_libxml2
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :	settings.mk
32
33.IF "$(SYSTEM_LIBXML)" == "YES"
34all:
35	@echo "An already available installation of libxml 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
41LIBXML2VERSION=2.9.8
42
43TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
44TARFILE_MD5=b786e353e2aa1b872d70d5d1ca0c740d
45
46PATCH_FILES=libxml2-configure.patch
47
48# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
49#            libxml2-global-symbols.patch
50
51.IF "$(OS)" == "WNT"
52PATCH_FILES+= libxml2-nan-inf-fix.patch
53.ENDIF
54
55# This is only for UNX environment now
56
57.IF "$(OS)"=="WNT"
58.IF "$(COM)"=="GCC"
59xml2_CC=$(CC) -mthreads
60.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
61xml2_CC+=-shared-libgcc
62.ENDIF
63xml2_LIBS=-lws2_32
64.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
65xml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
66.ENDIF
67CONFIGURE_DIR=
68CONFIGURE_ACTION=.$/configure
69CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --without-debug --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(xml2_CC)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2 -L$(ILIB:s/;/ -L/)" LIBS="$(xml2_LIBS)" OBJDUMP=objdump
70BUILD_ACTION=$(GNUMAKE)
71BUILD_DIR=$(CONFIGURE_DIR)
72.ELSE
73CONFIGURE_DIR=win32
74CONFIGURE_ACTION=cscript configure.js
75CONFIGURE_FLAGS=iconv=no sax1=yes
76.IF "$(debug)"!=""
77CONFIGURE_FLAGS+=debug=yes
78.ENDIF
79BUILD_ACTION=nmake
80BUILD_DIR=$(CONFIGURE_DIR)
81.ENDIF
82.ELSE
83.IF "$(SYSBASE)"!=""
84xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
85.IF "$(COMNAME)"=="sunpro5"
86xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
87.ENDIF			# "$(COMNAME)"=="sunpro5"
88xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
89.ENDIF			# "$(SYSBASE)"!=""
90
91CONFIGURE_DIR=
92.IF "$(OS)"=="OS2"
93CONFIGURE_ACTION=sh .$/configure
94CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
95.ELSE
96CONFIGURE_ACTION=.$/configure
97CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
98.ENDIF
99BUILD_ACTION=$(GNUMAKE)
100BUILD_FLAGS+= -j$(EXTMAXPROCESS)
101BUILD_DIR=$(CONFIGURE_DIR)
102.ENDIF
103
104
105OUTDIR2INC=include$/libxml
106
107.IF "$(OS)"=="MACOSX"
108EXTRPATH=URELIB
109OUT2LIB+=.libs$/libxml2.*.dylib
110OUT2BIN+=.libs$/xmllint
111OUT2BIN+=xml2-config
112.ELIF "$(OS)"=="WNT"
113.IF "$(COM)"=="GCC"
114OUT2LIB+=.libs$/libxml2*.a
115OUT2BIN+=.libs$/libxml2*.dll
116OUT2BIN+=.libs$/xmllint.exe
117OUT2BIN+=xml2-config
118.ELSE
119OUT2LIB+=win32$/bin.msvc$/*.lib
120OUT2BIN+=win32$/bin.msvc$/*.dll
121OUT2BIN+=win32$/bin.msvc$/xmllint.exe
122.ENDIF
123.ELSE
124OUT2LIB+=.libs$/libxml2.so*
125OUT2BIN+=.libs$/xmllint
126OUT2BIN+=xml2-config
127.ENDIF
128
129# --- Targets ------------------------------------------------------
130
131.INCLUDE : set_ext.mk
132.INCLUDE : target.mk
133.INCLUDE : tg_ext.mk
134
135