Bump for 4.0-11
[LibreOffice.git] / redland / rasqal / makefile.mk
blobd10239b3b68c22caf5b4cdcc450a9c1c323134ad
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
28 PRJ=..
30 PRJNAME=redland
31 TARGET=so_rasqal
33 # --- Settings -----------------------------------------------------
35 .INCLUDE : settings.mk
37 .IF "$(SYSTEM_REDLAND)" == "YES"
38 all:
39 @echo "An already available installation of Redland RDF should exist on your system."
40 @echo "Therefore the version provided here does not need to be built in addition."
41 .ENDIF
43 # --- Files --------------------------------------------------------
45 .INCLUDE : ../redlandversion.mk
47 RASQALVERSION=0.9.16
49 TARFILE_NAME=rasqal-$(RASQALVERSION)
50 TARFILE_MD5=fca8706f2c4619e2fa3f8f42f8fc1e9d
52 ADDITIONAL_FILES=src/makefile.mk src/rasqal_config.h
54 OOO_PATCH_FILES= \
55 $(TARFILE_NAME).patch.legal \
56 $(TARFILE_NAME).patch.autotools \
57 $(TARFILE_NAME).patch.ooo_build \
58 $(TARFILE_NAME).patch.dmake \
59 $(TARFILE_NAME).patch.win32 \
60 rasqal-aix.patch
62 .IF "$(GUI)" == "UNX"
63 OOO_PATCH_FILES+= \
64 $(TARFILE_NAME).patch.bundled-soname
65 .ENDIF
67 PATCH_FILES=$(OOO_PATCH_FILES)
69 .IF "$(OS)"=="ANDROID"
70 PATCH_FILES+=$(TARFILE_NAME).patch.no-soname
71 .ENDIF
73 .IF "$(OS)"=="WNT"
74 .IF "$(COM)"=="GCC"
75 OOO_PATCH_FILES+=$(TARFILE_NAME).patch.mingw
76 rasqal_CC=$(CC) -mthreads
77 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
78 rasqal_CC+=-shared-libgcc
79 .ENDIF
80 rasqal_LIBS=
82 rasqal_LDFLAGS=-Wl,--no-undefined -Wl,--enable-runtime-pseudo-reloc-v2,--export-all-symbols
83 .IF "$(ILIB)"!=""
84 rasqal_LDFLAGS+= -L$(ILIB:s/;/ -L/)
85 .ENDIF
87 CONFIGURE_DIR=
88 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
89 CONFIGURE_FLAGS=--disable-static --enable-shared --disable-gtk-doc --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --disable-pcre --with-decimal=none --with-www=xml --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) lt_cv_cc_dll_switch="-shared" CC="$(rasqal_CC)" CPPFLAGS="$(INCLUDE)" LDFLAGS="$(rasqal_LDFLAGS)" LIBS="$(rasqal_LIBS)" OBJDUMP="$(WRAPCMD) $(HOST_PLATFORM)-objdump" LIBXML2LIB="$(LIBXML2LIB)" XSLTLIB="$(XSLTLIB)"
90 BUILD_ACTION=$(GNUMAKE)
91 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
92 BUILD_DIR=$(CONFIGURE_DIR)
93 .ELSE
94 # there is no wntmsci build environment in the tarball; we use custom dmakefile
95 BUILD_ACTION=dmake
96 BUILD_DIR=$(CONFIGURE_DIR)$/src
97 .ENDIF
98 .ELSE # "WNT"
100 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
101 LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
102 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
103 .IF "$(OS)$(COM)"=="SOLARISC52"
104 LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
105 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
107 .IF "$(DISABLE_DYNLOADING)"=="TRUE"
108 CFLAGS=-fvisibility=hidden
109 .ENDIF
111 .IF "$(COM)"=="C52" && "$(CPU)"=="U"
112 CFLAGS+=-m64
113 .EXPORT: CFLAGS
114 .ENDIF
116 # NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
117 CPPFLAGS+:=-I$(SOLARINCDIR)$/external
118 LDFLAGS+:=-L$(SOLARLIBDIR)
120 .IF "$(OS)"=="AIX"
121 LDFLAGS+:=$(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO)
122 .ENDIF
124 .IF "$(SYSBASE)"!=""
125 CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
126 .IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
127 LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
128 .ENDIF
129 .ENDIF # "$(SYSBASE)"!=""
131 .IF "$(OS)"=="MACOSX" && "$(SYSTEM_LIBXML)" != "YES"
132 LDFLAGS+:=-Wl,-dylib_file,@loader_path/../ure-link/lib/libxml2.2.dylib:$(SOLARLIBDIR)/libxml2.2.dylib
133 .ENDIF
135 CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
136 LDFLAGS+:=$(EXTRA_LINKFLAGS)
137 XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
139 .EXPORT: CPPFLAGS
140 .EXPORT: LDFLAGS
141 .EXPORT: LIBXML2LIB
142 .EXPORT: XSLTLIB
144 CONFIGURE_DIR=
145 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
146 .IF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
147 CONFIGURE_FLAGS=--disable-shared
148 .ELSE
149 CONFIGURE_FLAGS=--disable-static
150 .ENDIF
151 CONFIGURE_FLAGS+= --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
152 .IF "$(OS)" == "MACOSX"
153 CONFIGURE_FLAGS += \
154 --prefix=/@.__________________________________________________$(EXTRPATH)
155 .END
156 .IF "$(CROSS_COMPILING)"=="YES"
157 CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
158 .ENDIF
159 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
160 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
161 BUILD_DIR=$(CONFIGURE_DIR)
162 .ENDIF
165 OUT2INC+=src$/rasqal.h
167 .IF "$(OS)"=="MACOSX"
168 OUT2LIB+=src$/.libs$/librasqal-lo.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
169 OUT2BIN+=src/rasqal-config
170 .ELIF "$(OS)"=="IOS" || "$(OS)"=="ANDROID"
171 OUT2LIB+=src$/.libs$/librasqal.a
172 OUT2BIN+=src/rasqal-config
173 .ELIF "$(OS)"=="WNT"
174 .IF "$(COM)"=="GCC"
175 OUT2LIB+=src$/.libs$/*.a
176 OUT2BIN+=src$/.libs$/*.dll
177 OUT2BIN+=src/rasqal-config
178 .ELSE
179 # if we use dmake, this is done automagically
180 .ENDIF
181 .ELSE
182 OUT2LIB+=src$/.libs$/librasqal-lo.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so
183 OUT2BIN+=src/rasqal-config
184 .ENDIF
186 # --- Targets ------------------------------------------------------
188 .INCLUDE : set_ext.mk
189 .INCLUDE : target.mk
190 .INCLUDE : tg_ext.mk