Update ooo320-m1
[ooovba.git] / libxml2 / makefile.mk
bloba9c2336b16ccf6850f15d2e32682f6c8921130a9
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.24 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=.
34 PRJNAME=libxml2
35 TARGET=so_libxml2
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 .IF "$(SYSTEM_LIBXML)" == "YES"
42 all:
43 @echo "An already available installation of libxml should exist on your system."
44 @echo "Therefore the version provided here does not need to be built in addition."
45 .ENDIF
47 # --- Files --------------------------------------------------------
49 LIBXML2VERSION=2.6.31
51 TARFILE_NAME=$(PRJNAME)-$(LIBXML2VERSION)
52 #.IF "$(OS)$(COM)"=="WNTGCC"
53 #PATCH_FILES=$(TARFILE_NAME)-mingw.patch
54 #.ELSE
55 PATCH_FILES=$(TARFILE_NAME).patch
56 #.ENDIF
58 # This is only for UNX environment now
60 .IF "$(OS)"=="WNT"
61 .IF "$(COM)"=="GCC"
62 PATCH_FILES+=$(TARFILE_NAME)-mingw.patch
63 xml2_CC=$(CC)
64 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
65 xml2_CC+=-shared-libgcc
66 .ENDIF
67 xml2_LIBS=-lws2_32 -lmingwthrd
68 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
69 xml2_LIBS+=-lstdc++_s
70 .ENDIF
71 CONFIGURE_DIR=
72 CONFIGURE_ACTION=.$/configure
73 CONFIGURE_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)" CFLAGS=-D_MT LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc -L$(ILIB:s/;/ -L/)" LIBS="$(xml2_LIBS)" OBJDUMP="$(WRAPCMD) objdump"
74 BUILD_ACTION=$(GNUMAKE)
75 BUILD_DIR=$(CONFIGURE_DIR)
76 .ELSE
77 CONFIGURE_DIR=win32
78 CONFIGURE_ACTION=cscript configure.js
79 CONFIGURE_FLAGS=iconv=no sax1=yes
80 .IF "$(debug)"!=""
81 CONFIGURE_FLAGS+=debug=yes
82 .ENDIF
83 BUILD_ACTION=nmake
84 BUILD_DIR=$(CONFIGURE_DIR)
85 .ENDIF
86 .ELSE
87 .IF "$(SYSBASE)"!=""
88 xml2_CFLAGS+=-I$(SYSBASE)$/usr$/include
89 .IF "$(COMNAME)"=="sunpro5"
90 xml2_CFLAGS+=$(ARCH_FLAGS) $(C_RESTRICTIONFLAGS)
91 .ENDIF # "$(COMNAME)"=="sunpro5"
92 xml2_LDFLAGS+=-L$(SYSBASE)$/usr$/lib
93 .ENDIF # "$(SYSBASE)"!=""
95 .IF "$(OS)$(COM)"=="LINUXGCC"
96 xml2_LDFLAGS+=-Wl,-z,noexecstack
97 .ENDIF
99 CONFIGURE_DIR=
100 .IF "$(OS)"=="OS2"
101 CONFIGURE_ACTION=sh .$/configure
102 CONFIGURE_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)"
103 .ELSE
104 CONFIGURE_ACTION=.$/configure
105 CONFIGURE_FLAGS=--enable-ipv6=no --without-python --without-zlib --enable-static=no --with-sax1=yes ADDCFLAGS="$(xml2_CFLAGS) $(EXTRA_CFLAGS)" LDFLAGS="$(xml2_LDFLAGS) $(EXTRA_LINKFLAGS)"
106 .ENDIF
107 BUILD_ACTION=$(GNUMAKE)
108 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
109 BUILD_DIR=$(CONFIGURE_DIR)
110 .ENDIF
113 OUTDIR2INC=include$/libxml
115 .IF "$(OS)"=="MACOSX"
116 EXTRPATH=URELIB
117 OUT2LIB+=.libs$/libxml2.*.dylib
118 OUT2BIN+=.libs$/xmllint
119 OUT2BIN+=xml2-config
120 .ELIF "$(OS)"=="WNT"
121 .IF "$(COM)"=="GCC"
122 OUT2LIB+=.libs$/libxml2*.a
123 OUT2BIN+=.libs$/libxml2*.dll
124 OUT2BIN+=.libs$/xmllint.exe
125 OUT2BIN+=xml2-config
126 .ELSE
127 OUT2LIB+=win32$/bin.msvc$/*.lib
128 OUT2BIN+=win32$/bin.msvc$/*.dll
129 OUT2BIN+=win32$/bin.msvc$/xmllint.exe
130 .ENDIF
131 .ELSE
132 OUT2LIB+=.libs$/libxml2.so*
133 OUT2BIN+=.libs$/xmllint
134 OUT2BIN+=xml2-config
135 .ENDIF
137 # --- Targets ------------------------------------------------------
139 .INCLUDE : set_ext.mk
140 .INCLUDE : target.mk
141 .INCLUDE : tg_ext.mk