1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
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 #*************************************************************************
33 # --- Settings -----------------------------------------------------
35 .INCLUDE
: settings.mk
37 .IF
"$(SYSTEM_REDLAND)" == "YES"
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."
43 # --- Files --------------------------------------------------------
45 .INCLUDE
: ..
/redlandversion.mk
49 TARFILE_NAME
=rasqal-
$(RASQALVERSION
)
50 TARFILE_MD5
=fca8706f2c4619e2fa3f8f42f8fc1e9d
52 ADDITIONAL_FILES
=src
/makefile.mk src
/rasqal_config.h
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 \
64 $(TARFILE_NAME
).patch.bundled-soname
67 PATCH_FILES
=$(OOO_PATCH_FILES
)
69 .IF
"$(OS)"=="ANDROID"
70 PATCH_FILES
+=$(TARFILE_NAME
).patch.no-soname
75 OOO_PATCH_FILES
+=$(TARFILE_NAME
).patch.mingw
76 rasqal_CC
=$(CC
) -mthreads
77 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
78 rasqal_CC
+=-shared-libgcc
82 rasqal_LDFLAGS
=-Wl
,--no-undefined
-Wl
,--enable-runtime-pseudo-reloc-v2
,--export-all-symbols
84 rasqal_LDFLAGS
+= -L
$(ILIB
:s
/;/ -L
/)
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
)
94 # there is no wntmsci build environment in the tarball; we use custom dmakefile
96 BUILD_DIR
=$(CONFIGURE_DIR
)$/src
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
111 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
116 # NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
117 CPPFLAGS
+:=-I
$(SOLARINCDIR
)$/external
118 LDFLAGS
+:=-L
$(SOLARLIBDIR
)
121 LDFLAGS
+:=$(LINKFLAGS
) $(LINKFLAGSRUNPATH_OOO
)
125 CPPFLAGS
+:=-I
$(SYSBASE
)$/usr
$/include
126 .IF
"$(OS)"=="SOLARIS" ||
"$(OS)"=="LINUX"
127 LDFLAGS
+:=-L
$(SYSBASE
)$/lib
-L
$(SYSBASE
)$/usr
$/lib
-lpthread
-ldl
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
135 CPPFLAGS
+:=$(EXTRA_CDEFS
) $(EXTRA_CFLAGS
)
136 LDFLAGS
+:=$(EXTRA_LINKFLAGS
)
137 XSLTLIB
!:=$(XSLTLIB
) # expand dmake variables for xslt-config
145 CONFIGURE_ACTION
=.
$/configure PATH
="..$/..$/..$/bin:$$PATH"
146 .IF
"$(OS)"=="IOS" ||
"$(OS)"=="ANDROID"
147 CONFIGURE_FLAGS
=--disable-shared
149 CONFIGURE_FLAGS
=--disable-static
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"
154 --prefix=/@.__________________________________________________
$(EXTRPATH
)
156 .IF
"$(CROSS_COMPILING)"=="YES"
157 CONFIGURE_FLAGS
+= --build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
159 BUILD_ACTION
=$(AUGMENT_LIBRARY_PATH
) $(GNUMAKE
)
160 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
161 BUILD_DIR
=$(CONFIGURE_DIR
)
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
175 OUT2LIB
+=src
$/.libs
$/*.a
176 OUT2BIN
+=src
$/.libs
$/*.dll
177 OUT2BIN
+=src
/rasqal-config
179 # if we use dmake, this is done automagically
182 OUT2LIB
+=src
$/.libs
$/librasqal-lo.so.
$(RASQAL_MAJOR
) src
$/.libs
$/librasqal.so
183 OUT2BIN
+=src
/rasqal-config
186 # --- Targets ------------------------------------------------------
188 .INCLUDE
: set_ext.mk