xref: /aoo41x/main/libxml2/makefile.mk (revision c6c5eeba)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ=.
25cdf0e10cSrcweir
26cdf0e10cSrcweirPRJNAME=libxml2
27cdf0e10cSrcweirTARGET=so_libxml2
28cdf0e10cSrcweir
29cdf0e10cSrcweir# --- Settings -----------------------------------------------------
30cdf0e10cSrcweir
31cdf0e10cSrcweir.INCLUDE :	settings.mk
32cdf0e10cSrcweir
33cdf0e10cSrcweir.IF "$(SYSTEM_LIBXML)" == "YES"
34*c6c5eebaSJian Fang Zhangall:
35*c6c5eebaSJian Fang Zhang	@echo "An already available installation of libxml should exist on your system."
36*c6c5eebaSJian Fang Zhang	@echo "Therefore the version provided here does not need to be built in addition."
37cdf0e10cSrcweir.ENDIF
38cdf0e10cSrcweir
39cdf0e10cSrcweir# --- Files --------------------------------------------------------
40cdf0e10cSrcweir
41cdf0e10cSrcweirLIBXML2VERSION=2.7.6
42cdf0e10cSrcweir
43cdf0e10cSrcweirTARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
44cdf0e10cSrcweirTARFILE_MD5=7740a8ec23878a2f50120e1faa2730f2
45cdf0e10cSrcweir
46cdf0e10cSrcweir# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
47cdf0e10cSrcweirPATCH_FILES=libxml2-configure.patch \
48cdf0e10cSrcweir            libxml2-mingw.patch \
49cdf0e10cSrcweir            libxml2-gnome599717.patch \
50cdf0e10cSrcweir            libxml2-xpath.patch \
51cdf0e10cSrcweir            libxml2-global-symbols.patch \
5200bc49baSJian Fang Zhang            libxml2-testapi.patch \
5300bc49baSJian Fang Zhang            libxml2-runtest.patch
54cdf0e10cSrcweir
55cdf0e10cSrcweir.IF "$(OS)" == "WNT"
56cdf0e10cSrcweirPATCH_FILES+= libxml2-long-path.patch
57cdf0e10cSrcweir.ENDIF
58cdf0e10cSrcweir
59cdf0e10cSrcweir# This is only for UNX environment now
60cdf0e10cSrcweir
61cdf0e10cSrcweir.IF "$(OS)"=="WNT"
62cdf0e10cSrcweir.IF "$(COM)"=="GCC"
63cdf0e10cSrcweirxml2_CC=$(CC) -mthreads
64cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
65cdf0e10cSrcweirxml2_CC+=-shared-libgcc
66cdf0e10cSrcweir.ENDIF
67cdf0e10cSrcweirxml2_LIBS=-lws2_32
68cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
69cdf0e10cSrcweirxml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
70cdf0e10cSrcweir.ENDIF
71cdf0e10cSrcweirCONFIGURE_DIR=
72cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
73cdf0e10cSrcweirCONFIGURE_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
74cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
75cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
76cdf0e10cSrcweir.ELSE
77cdf0e10cSrcweirCONFIGURE_DIR=win32
78cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js
79cdf0e10cSrcweirCONFIGURE_FLAGS=iconv=no sax1=yes
80cdf0e10cSrcweir.IF "$(debug)"!=""
81cdf0e10cSrcweirCONFIGURE_FLAGS+=debug=yes
82cdf0e10cSrcweir.ENDIF
83cdf0e10cSrcweirBUILD_ACTION=nmake
84cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
85cdf0e10cSrcweir.ENDIF
86cdf0e10cSrcweir.ELSE
87cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
88cdf0e10cSrcweirxml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
89cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
90cdf0e10cSrcweirxml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
91cdf0e10cSrcweir.ENDIF			# "$(COMNAME)"=="sunpro5"
92cdf0e10cSrcweirxml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
93cdf0e10cSrcweir.ENDIF			# "$(SYSBASE)"!=""
94cdf0e10cSrcweir
95cdf0e10cSrcweirCONFIGURE_DIR=
96cdf0e10cSrcweir.IF "$(OS)"=="OS2"
97cdf0e10cSrcweirCONFIGURE_ACTION=sh .$/configure
98cdf0e10cSrcweirCONFIGURE_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)"
99cdf0e10cSrcweir.ELSE
100cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
101cdf0e10cSrcweirCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
102cdf0e10cSrcweir.ENDIF
103cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
104cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
105cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
106cdf0e10cSrcweir.ENDIF
107cdf0e10cSrcweir
108cdf0e10cSrcweir
109cdf0e10cSrcweirOUTDIR2INC=include$/libxml
110cdf0e10cSrcweir
111cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
112cdf0e10cSrcweirEXTRPATH=URELIB
113cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.*.dylib
114cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
115cdf0e10cSrcweirOUT2BIN+=xml2-config
116cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
117cdf0e10cSrcweir.IF "$(COM)"=="GCC"
118cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2*.a
119cdf0e10cSrcweirOUT2BIN+=.libs$/libxml2*.dll
120cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint.exe
121cdf0e10cSrcweirOUT2BIN+=xml2-config
122cdf0e10cSrcweir.ELSE
123cdf0e10cSrcweirOUT2LIB+=win32$/bin.msvc$/*.lib
124cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/*.dll
125cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/xmllint.exe
126cdf0e10cSrcweir.ENDIF
127cdf0e10cSrcweir.ELSE
128cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.so*
129cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
130cdf0e10cSrcweirOUT2BIN+=xml2-config
131cdf0e10cSrcweir.ENDIF
132cdf0e10cSrcweir
133cdf0e10cSrcweir# --- Targets ------------------------------------------------------
134cdf0e10cSrcweir
135cdf0e10cSrcweir.INCLUDE : set_ext.mk
136cdf0e10cSrcweir.INCLUDE : target.mk
137cdf0e10cSrcweir.INCLUDE : tg_ext.mk
138cdf0e10cSrcweir
139