xref: /aoo41x/main/libxml2/makefile.mk (revision 7871dc3e)
1*7871dc3eSAndrew Rist#**************************************************************
2*7871dc3eSAndrew Rist#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10*7871dc3eSAndrew Rist#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12*7871dc3eSAndrew Rist#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19*7871dc3eSAndrew Rist#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ=.
25cdf0e10cSrcweir
26cdf0e10cSrcweirPRJNAME=libxml2
27cdf0e10cSrcweirTARGET=so_libxml2
28cdf0e10cSrcweir
29cdf0e10cSrcweir# --- Settings -----------------------------------------------------
30cdf0e10cSrcweir
31cdf0e10cSrcweir.INCLUDE :	settings.mk
32cdf0e10cSrcweir
33cdf0e10cSrcweir.IF "$(SYSTEM_LIBXML)" == "YES"
34cdf0e10cSrcweirall:
35cdf0e10cSrcweir	@echo "An already available installation of libxml should exist on your system."
36cdf0e10cSrcweir	@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 \
52cdf0e10cSrcweir
53cdf0e10cSrcweir.IF "$(OS)" == "WNT"
54cdf0e10cSrcweirPATCH_FILES+= libxml2-long-path.patch
55cdf0e10cSrcweir.ENDIF
56cdf0e10cSrcweir
57cdf0e10cSrcweir# This is only for UNX environment now
58cdf0e10cSrcweir
59cdf0e10cSrcweir.IF "$(OS)"=="WNT"
60cdf0e10cSrcweir.IF "$(COM)"=="GCC"
61cdf0e10cSrcweirxml2_CC=$(CC) -mthreads
62cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
63cdf0e10cSrcweirxml2_CC+=-shared-libgcc
64cdf0e10cSrcweir.ENDIF
65cdf0e10cSrcweirxml2_LIBS=-lws2_32
66cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
67cdf0e10cSrcweirxml2_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
68cdf0e10cSrcweir.ENDIF
69cdf0e10cSrcweirCONFIGURE_DIR=
70cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
71cdf0e10cSrcweirCONFIGURE_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
72cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
73cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
74cdf0e10cSrcweir.ELSE
75cdf0e10cSrcweirCONFIGURE_DIR=win32
76cdf0e10cSrcweirCONFIGURE_ACTION=cscript configure.js
77cdf0e10cSrcweirCONFIGURE_FLAGS=iconv=no sax1=yes
78cdf0e10cSrcweir.IF "$(debug)"!=""
79cdf0e10cSrcweirCONFIGURE_FLAGS+=debug=yes
80cdf0e10cSrcweir.ENDIF
81cdf0e10cSrcweirBUILD_ACTION=nmake
82cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
83cdf0e10cSrcweir.ENDIF
84cdf0e10cSrcweir.ELSE
85cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
86cdf0e10cSrcweirxml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
87cdf0e10cSrcweir.IF "$(COMNAME)"=="sunpro5"
88cdf0e10cSrcweirxml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
89cdf0e10cSrcweir.ENDIF			# "$(COMNAME)"=="sunpro5"
90cdf0e10cSrcweirxml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
91cdf0e10cSrcweir.ENDIF			# "$(SYSBASE)"!=""
92cdf0e10cSrcweir
93cdf0e10cSrcweirCONFIGURE_DIR=
94cdf0e10cSrcweir.IF "$(OS)"=="OS2"
95cdf0e10cSrcweirCONFIGURE_ACTION=sh .$/configure
96cdf0e10cSrcweirCONFIGURE_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)"
97cdf0e10cSrcweir.ELSE
98cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
99cdf0e10cSrcweirCONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
100cdf0e10cSrcweir.ENDIF
101cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
102cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
103cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
104cdf0e10cSrcweir.ENDIF
105cdf0e10cSrcweir
106cdf0e10cSrcweir
107cdf0e10cSrcweirOUTDIR2INC=include$/libxml
108cdf0e10cSrcweir
109cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
110cdf0e10cSrcweirEXTRPATH=URELIB
111cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.*.dylib
112cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
113cdf0e10cSrcweirOUT2BIN+=xml2-config
114cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
115cdf0e10cSrcweir.IF "$(COM)"=="GCC"
116cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2*.a
117cdf0e10cSrcweirOUT2BIN+=.libs$/libxml2*.dll
118cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint.exe
119cdf0e10cSrcweirOUT2BIN+=xml2-config
120cdf0e10cSrcweir.ELSE
121cdf0e10cSrcweirOUT2LIB+=win32$/bin.msvc$/*.lib
122cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/*.dll
123cdf0e10cSrcweirOUT2BIN+=win32$/bin.msvc$/xmllint.exe
124cdf0e10cSrcweir.ENDIF
125cdf0e10cSrcweir.ELSE
126cdf0e10cSrcweirOUT2LIB+=.libs$/libxml2.so*
127cdf0e10cSrcweirOUT2BIN+=.libs$/xmllint
128cdf0e10cSrcweirOUT2BIN+=xml2-config
129cdf0e10cSrcweir.ENDIF
130cdf0e10cSrcweir
131cdf0e10cSrcweir# --- Targets ------------------------------------------------------
132cdf0e10cSrcweir
133cdf0e10cSrcweir.INCLUDE : set_ext.mk
134cdf0e10cSrcweir.INCLUDE : target.mk
135cdf0e10cSrcweir.INCLUDE : tg_ext.mk
136cdf0e10cSrcweir
137