xref: /aoo41x/main/libxml2/makefile.mk (revision 2d019523)
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*2d019523SJim JagielskiLIBXML2VERSION=2.9.8
42cdf0e10cSrcweir
43cdf0e10cSrcweirTARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
44*2d019523SJim JagielskiTARFILE_MD5=b786e353e2aa1b872d70d5d1ca0c740d
45*2d019523SJim Jagielski
46*2d019523SJim JagielskiPATCH_FILES=libxml2-configure.patch
47cdf0e10cSrcweir
48cdf0e10cSrcweir# libxml2-global-symbols: #i112480#: Solaris ld won't export non-listed symbols
49*2d019523SJim Jagielski#            libxml2-global-symbols.patch
50cdf0e10cSrcweir
51cdf0e10cSrcweir.IF "$(OS)" == "WNT"
52*2d019523SJim JagielskiPATCH_FILES+= libxml2-nan-inf-fix.patch
53cdf0e10cSrcweir.ENDIF
54cdf0e10cSrcweir
55cdf0e10cSrcweir# This is only for UNX environment now
56cdf0e10cSrcweir
57cdf0e10cSrcweir.IF "$(OS)"=="WNT"
58cdf0e10cSrcweir.IF "$(COM)"=="GCC"
59cdf0e10cSrcweirxml2_CC=$(CC) -mthreads
60cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
61cdf0e10cSrcweirxml2_CC+=-shared-libgcc
62cdf0e10cSrcweir.ENDIF
63cdf0e10cSrcweirxml2_LIBS=-lws2_32
64cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
65cdf0e10cSrcweirxml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
66cdf0e10cSrcweir.ENDIF
67cdf0e10cSrcweirCONFIGURE_DIR=
68cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
69cdf0e10cSrcweirCONFIGURE_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
70cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
71cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
72cdf0e10cSrcweir.ELSE
73cdf0e10cSrcweirCONFIGURE_DIR=win32
74cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js
75cdf0e10cSrcweirCONFIGURE_FLAGS=iconv=no sax1=yes
76cdf0e10cSrcweir.IF "$(debug)"!=""
77cdf0e10cSrcweirCONFIGURE_FLAGS+=debug=yes
78cdf0e10cSrcweir.ENDIF
79cdf0e10cSrcweirBUILD_ACTION=nmake
80cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
81cdf0e10cSrcweir.ENDIF
82cdf0e10cSrcweir.ELSE
83cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
84cdf0e10cSrcweirxml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
85cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
86cdf0e10cSrcweirxml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
87cdf0e10cSrcweir.ENDIF			# "$(COMNAME)"=="sunpro5"
88cdf0e10cSrcweirxml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
89cdf0e10cSrcweir.ENDIF			# "$(SYSBASE)"!=""
90cdf0e10cSrcweir
91cdf0e10cSrcweirCONFIGURE_DIR=
92cdf0e10cSrcweir.IF "$(OS)"=="OS2"
93cdf0e10cSrcweirCONFIGURE_ACTION=sh .$/configure
94cdf0e10cSrcweirCONFIGURE_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)"
95cdf0e10cSrcweir.ELSE
96cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
97cdf0e10cSrcweirCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
98cdf0e10cSrcweir.ENDIF
99cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
100cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
101cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
102cdf0e10cSrcweir.ENDIF
103cdf0e10cSrcweir
104cdf0e10cSrcweir
105cdf0e10cSrcweirOUTDIR2INC=include$/libxml
106cdf0e10cSrcweir
107cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
108cdf0e10cSrcweirEXTRPATH=URELIB
109cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.*.dylib
110cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
111cdf0e10cSrcweirOUT2BIN+=xml2-config
112cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
113cdf0e10cSrcweir.IF "$(COM)"=="GCC"
114cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2*.a
115cdf0e10cSrcweirOUT2BIN+=.libs$/libxml2*.dll
116cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint.exe
117cdf0e10cSrcweirOUT2BIN+=xml2-config
118cdf0e10cSrcweir.ELSE
119cdf0e10cSrcweirOUT2LIB+=win32$/bin.msvc$/*.lib
120cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/*.dll
121cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/xmllint.exe
122cdf0e10cSrcweir.ENDIF
123cdf0e10cSrcweir.ELSE
124cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.so*
125cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
126cdf0e10cSrcweirOUT2BIN+=xml2-config
127cdf0e10cSrcweir.ENDIF
128cdf0e10cSrcweir
129cdf0e10cSrcweir# --- Targets ------------------------------------------------------
130cdf0e10cSrcweir
131cdf0e10cSrcweir.INCLUDE : set_ext.mk
132cdf0e10cSrcweir.INCLUDE : target.mk
133cdf0e10cSrcweir.INCLUDE : tg_ext.mk
134cdf0e10cSrcweir
135