merge the formfield patch from ooo-build
[ooovba.git] / libxslt / makefile.mk
blob4569a181072493b923746f5b7e2c6b8a47d6f8d2
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.16 $
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=libxslt
35 TARGET=so_libxslt
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 .IF "$(SYSTEM_LIBXSLT)" == "YES"
42 all:
43 @echo "An already available installation of libxslt 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 .IF "$(L10N_framework)"==""
51 .INCLUDE : libxsltversion.mk
53 LIBXSLTVERSION=$(LIBXSLT_MAJOR).$(LIBXSLT_MINOR).$(LIBXSLT_MICRO)
55 TARFILE_NAME=$(PRJNAME)-$(LIBXSLTVERSION)
56 PATCH_FILES=$(TARFILE_NAME).patch $(TARFILE_NAME)_win_manifest.patch
58 # This is only for UNX environment now
59 .IF "$(OS)"=="WNT"
60 .IF "$(COM)"=="GCC"
61 xslt_CC=$(CC)
62 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
63 xslt_CC+=-shared-libgcc
64 .ENDIF
65 xslt_LIBS=-lmingwthrd
66 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
67 xslt_LIBS+=-lstdc++_s
68 .ENDIF
69 CONFIGURE_DIR=
70 CONFIGURE_ACTION=.$/configure
71 CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=no --with-sax1=yes --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xslt_CC)" CFLAGS="$(xslt_CFLAGS) -D_MT" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xslt_LIBS)" LIBXML2LIB=$(LIBXML2LIB) OBJDUMP="$(WRAPCMD) objdump"
72 BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
73 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
74 BUILD_DIR=$(CONFIGURE_DIR)
75 .IF "$(GUI)$(COM)"=="WNTGCC"
76 .EXPORT : PWD
77 .ENDIF
78 .ELSE
79 CONFIGURE_DIR=win32
80 CONFIGURE_ACTION=cscript configure.js
81 #CONFIGURE_FLAGS=iconv=no sax1=yes
82 .IF "$(debug)"!=""
83 CONFIGURE_FLAGS+=debug=yes
84 .ENDIF
85 BUILD_ACTION=nmake
86 BUILD_DIR=$(CONFIGURE_DIR)
87 .ENDIF
88 .ELSE
90 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
91 LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec -Wl,-z,noexecstack
92 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
93 .IF "$(OS)$(COM)"=="SOLARISC52"
94 LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
95 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
97 .IF "$(SYSBASE)"!=""
98 CPPFLAGS+:=-I$(SOLARINCDIR)$/external -I$(SYSBASE)$/usr$/include $(EXTRA_CFLAGS)
99 .IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
100 LDFLAGS+:=-L$(SOLARLIBDIR) -L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
101 .ENDIF
102 .ENDIF # "$(SYSBASE)"!=""
104 .EXPORT: CPPFLAGS
105 .EXPORT: LDFLAGS
106 .EXPORT: LIBXML2LIB
108 .IF "$(COMNAME)"=="sunpro5"
109 CPPFLAGS+:=$(ARCH_FLAGS) -xc99=none
110 .ENDIF # "$(COMNAME)"=="sunpro5"
111 CONFIGURE_DIR=
112 CONFIGURE_ACTION=.$/configure
113 CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python --enable-static=no --with-sax1=yes
114 BUILD_ACTION=chmod 777 xslt-config && $(GNUMAKE)
115 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
116 BUILD_DIR=$(CONFIGURE_DIR)
117 .ENDIF
119 OUT2INC=libxslt$/*.h
121 .IF "$(OS)"=="MACOSX"
122 OUT2LIB+=libxslt$/.libs$/libxslt.*.dylib
123 OUT2LIB+=libexslt$/.libs$/libexslt.*.dylib
124 OUT2BIN+=xsltproc$/.libs$/xsltproc
125 OUT2BIN+=xslt-config
126 .ELIF "$(OS)"=="WNT"
127 .IF "$(COM)"=="GCC"
128 OUT2LIB+=libxslt$/.libs$/*.a
129 OUT2LIB+=libexslt$/.libs$/*.a
130 OUT2BIN+=libxslt$/.libs$/*.dll
131 OUT2BIN+=libexslt$/.libs$/*.dll
132 OUT2BIN+=xsltproc$/.libs$/*.exe*
133 OUT2BIN+=xslt-config
134 .ELSE
135 OUT2LIB+=win32$/bin.msvc$/*.lib
136 OUT2BIN+=win32$/bin.msvc$/*.dll
137 OUT2BIN+=win32$/bin.msvc$/*.exe
138 .ENDIF
139 .ELSE
140 OUT2LIB+=libxslt$/.libs$/libxslt.so*
141 OUT2LIB+=libexslt$/.libs$/libexslt.so*
142 OUT2BIN+=xsltproc$/.libs$/xsltproc
143 OUT2BIN+=xslt-config
144 .ENDIF
146 # --- Targets ------------------------------------------------------
147 .ENDIF # L10N_framework
148 .INCLUDE : set_ext.mk
149 .INCLUDE : target.mk
150 .INCLUDE : tg_ext.mk