xref: /aoo41x/main/redland/rasqal/makefile.mk (revision ab55ef1a)
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
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.
14#
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).
20#
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.
25#
26#*************************************************************************
27
28PRJ=..
29
30PRJNAME=redland
31TARGET=so_rasqal
32
33# --- Settings -----------------------------------------------------
34
35.INCLUDE :	settings.mk
36
37.IF "$(SYSTEM_REDLAND)" == "YES"
38all:
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
42
43# --- Files --------------------------------------------------------
44
45.INCLUDE :	../redlandversion.mk
46
47RASQALVERSION=0.9.16
48
49TARFILE_NAME=rasqal-$(RASQALVERSION)
50TARFILE_MD5=fca8706f2c4619e2fa3f8f42f8fc1e9d
51
52ADDITIONAL_FILES=src/makefile.mk src/rasqal_config.h
53
54OOO_PATCH_FILES= \
55    $(TARFILE_NAME).patch.autotools \
56    $(TARFILE_NAME).patch.ooo_build \
57    $(TARFILE_NAME).patch.dmake \
58    $(TARFILE_NAME).patch.win32
59
60PATCH_FILES=$(OOO_PATCH_FILES)
61
62
63.IF "$(OS)"=="OS2"
64BUILD_ACTION=dmake
65BUILD_DIR=$(CONFIGURE_DIR)$/src
66ADDITIONAL_FILES+=src/windows.h
67OOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2
68.ELIF "$(OS)"=="WNT"
69.IF "$(COM)"=="GCC"
70rasqal_CC=$(CC) -mthreads
71.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
72rasqal_CC+=-shared-libgcc
73.ENDIF
74rasqal_LIBS=
75.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
76rasqal_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
77.ENDIF
78
79CONFIGURE_DIR=
80CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
81CONFIGURE_FLAGS=--disable-static --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=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(rasqal_CC)" CPPFLAGS="-nostdinc $(INCLUDE)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2,--export-all-symbols -L$(ILIB:s/;/ -L/)" LIBS="$(rasqal_LIBS)" OBJDUMP="$(WRAPCMD) objdump" LIBXML2LIB=$(LIBXML2LIB) XSLTLIB="$(XSLTLIB)"
82BUILD_ACTION=$(GNUMAKE)
83BUILD_FLAGS+= -j$(EXTMAXPROCESS)
84BUILD_DIR=$(CONFIGURE_DIR)
85.ELSE
86# there is no wntmsci build environment in the tarball; we use custom dmakefile
87BUILD_ACTION=dmake
88BUILD_DIR=$(CONFIGURE_DIR)$/src
89.ENDIF
90.ELSE # "WNT"
91
92.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
93LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
94.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
95.IF "$(OS)$(COM)"=="SOLARISC52"
96LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
97.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
98
99.IF "$(COM)"=="C52" && "$(CPU)"=="U"
100CFLAGS=-m64
101.EXPORT: CFLAGS
102.ENDIF
103
104# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
105CPPFLAGS+:=-I$(SOLARINCDIR)$/external
106LDFLAGS+:=-L$(SOLARLIBDIR)
107
108.IF "$(SYSBASE)"!=""
109CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
110.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
111LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
112.ENDIF
113.ENDIF			# "$(SYSBASE)"!=""
114
115CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
116LDFLAGS+:=$(EXTRA_LINKFLAGS)
117XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
118
119.EXPORT: CPPFLAGS
120.EXPORT: LDFLAGS
121.EXPORT: LIBXML2LIB
122.EXPORT: XSLTLIB
123
124CONFIGURE_DIR=
125CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
126CONFIGURE_FLAGS=--disable-static --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
127BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
128BUILD_FLAGS+= -j$(EXTMAXPROCESS)
129BUILD_DIR=$(CONFIGURE_DIR)
130#INSTALL_ACTION=$(GNUMAKE) install
131#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
132.ENDIF
133
134
135OUT2INC+=src$/rasqal.h
136
137.IF "$(OS)"=="MACOSX"
138OUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
139OUT2BIN+=src/rasqal-config
140.ELIF "$(OS)"=="WNT"
141.IF "$(COM)"=="GCC"
142OUT2LIB+=src$/.libs$/*.a
143OUT2BIN+=src$/.libs$/*.dll
144OUT2BIN+=src/rasqal-config
145.ELSE
146# if we use dmake, this is done automagically
147.ENDIF
148.ELIF "$(OS)"=="OS2"
149# if we use dmake, this is done automagically
150.ELSE
151OUT2LIB+=src$/.libs$/librasqal.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so
152OUT2BIN+=src/rasqal-config
153.ENDIF
154
155# --- Targets ------------------------------------------------------
156
157.INCLUDE : set_ext.mk
158.INCLUDE : target.mk
159.INCLUDE : tg_ext.mk
160
161