xref: /aoo41x/main/libxml2/makefile.mk (revision 34f44591)
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"
34c6c5eebaSJian Fang Zhangall:
35c6c5eebaSJian Fang Zhang	@echo "An already available installation of libxml should exist on your system."
36c6c5eebaSJian Fang Zhang	@echo "Therefore the version provided here does not need to be built in addition."
37cdf0e10cSrcweir.ENDIF
38cdf0e10cSrcweir
39cdf0e10cSrcweir# --- Files --------------------------------------------------------
40cdf0e10cSrcweir
41*34f44591SDon LewisLIBXML2VERSION=2.9.10
42cdf0e10cSrcweir
43cdf0e10cSrcweirTARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
44*34f44591SDon LewisTARFILE_MD5=10942a1dc23137a8aa07f0639cbfece5
452d019523SJim Jagielski
462d019523SJim JagielskiPATCH_FILES=libxml2-configure.patch
47cdf0e10cSrcweir
48cdf0e10cSrcweir# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
492d019523SJim Jagielski#            libxml2-global-symbols.patch
50cdf0e10cSrcweir
51cdf0e10cSrcweir# This is only for UNX environment now
52cdf0e10cSrcweir
53cdf0e10cSrcweir.IF "$(OS)"=="WNT"
54cdf0e10cSrcweir.IF "$(COM)"=="GCC"
55cdf0e10cSrcweirxml2_CC=$(CC) -mthreads
56cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
57cdf0e10cSrcweirxml2_CC+=-shared-libgcc
58cdf0e10cSrcweir.ENDIF
59cdf0e10cSrcweirxml2_LIBS=-lws2_32
60cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
61cdf0e10cSrcweirxml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
62cdf0e10cSrcweir.ENDIF
63cdf0e10cSrcweirCONFIGURE_DIR=
64cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
65*34f44591SDon LewisCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-lzma --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
66cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
67cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
68cdf0e10cSrcweir.ELSE
69cdf0e10cSrcweirCONFIGURE_DIR=win32
70cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js
71*34f44591SDon LewisCONFIGURE_FLAGS=iconv=no sax1=yes lzma=no
72cdf0e10cSrcweir.IF "$(debug)"!=""
73cdf0e10cSrcweirCONFIGURE_FLAGS+=debug=yes
74cdf0e10cSrcweir.ENDIF
75cdf0e10cSrcweirBUILD_ACTION=nmake
76cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
77cdf0e10cSrcweir.ENDIF
78cdf0e10cSrcweir.ELSE
79cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
80cdf0e10cSrcweirxml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
81cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
82cdf0e10cSrcweirxml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
83cdf0e10cSrcweir.ENDIF			# "$(COMNAME)"=="sunpro5"
84cdf0e10cSrcweirxml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
85cdf0e10cSrcweir.ENDIF			# "$(SYSBASE)"!=""
86cdf0e10cSrcweir
87cdf0e10cSrcweirCONFIGURE_DIR=
88cdf0e10cSrcweir.IF "$(OS)"=="OS2"
89cdf0e10cSrcweirCONFIGURE_ACTION=sh .$/configure
90*34f44591SDon LewisCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --without-lzma --enable-static=yes --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS)" CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
91cdf0e10cSrcweir.ELSE
92cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
93*34f44591SDon LewisCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --without-lzma --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
94cdf0e10cSrcweir.ENDIF
95cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
96cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
97cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
98cdf0e10cSrcweir.ENDIF
99cdf0e10cSrcweir
100cdf0e10cSrcweir
101cdf0e10cSrcweirOUTDIR2INC=include$/libxml
102cdf0e10cSrcweir
103cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
104cdf0e10cSrcweirEXTRPATH=URELIB
105cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.*.dylib
106cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
107cdf0e10cSrcweirOUT2BIN+=xml2-config
108cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
109cdf0e10cSrcweir.IF "$(COM)"=="GCC"
110cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2*.a
111cdf0e10cSrcweirOUT2BIN+=.libs$/libxml2*.dll
112cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint.exe
113cdf0e10cSrcweirOUT2BIN+=xml2-config
114cdf0e10cSrcweir.ELSE
115cdf0e10cSrcweirOUT2LIB+=win32$/bin.msvc$/*.lib
116cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/*.dll
117cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/xmllint.exe
118cdf0e10cSrcweir.ENDIF
119cdf0e10cSrcweir.ELSE
120cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.so*
121cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
122cdf0e10cSrcweirOUT2BIN+=xml2-config
123cdf0e10cSrcweir.ENDIF
124cdf0e10cSrcweir
125cdf0e10cSrcweir# --- Targets ------------------------------------------------------
126cdf0e10cSrcweir
127cdf0e10cSrcweir.INCLUDE : set_ext.mk
128cdf0e10cSrcweir.INCLUDE : target.mk
129cdf0e10cSrcweir.INCLUDE : tg_ext.mk
130cdf0e10cSrcweir
131