xref: /aoo41x/main/redland/raptor/makefile.mk (revision cdf0e10c)
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_raptor
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
47RAPTORVERSION=$(RAPTOR_MAJOR).4.18
48
49TARFILE_NAME=raptor-$(RAPTORVERSION)
50TARFILE_MD5=284e768eeda0e2898b0d5bf7e26a016e
51
52ADDITIONAL_FILES=src/makefile.mk src/raptor_config.h
53
54OOO_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
61
62PATCH_FILES=$(OOO_PATCH_FILES)
63
64
65.IF "$(OS)"=="OS2"
66BUILD_ACTION=dmake
67BUILD_DIR=$(CONFIGURE_DIR)$/src
68.ELIF "$(OS)"=="WNT"
69.IF "$(COM)"=="GCC"
70OOO_PATCH_FILES+=$(TARFILE_NAME).patch.mingw
71raptor_CC=$(CC) -mthreads
72.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
73raptor_CC+=-shared-libgcc
74.ENDIF
75raptor_LIBS=
76.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
77raptor_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
78.ENDIF
79
80CONFIGURE_DIR=
81CONFIGURE_ACTION=.$/configure
82# do not enable grddl parser (#i93768#)
83CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" CC="$(raptor_CC)" CPPFLAGS="-nostdinc $(INCLUDE)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2,--export-all-symbols  -L$(ILIB:s/;/ -L/)" LIBS="$(raptor_LIBS)" OBJDUMP="$(WRAPCMD) objdump" LIBXML2LIB=$(LIBXML2LIB) XSLTLIB="$(XSLTLIB)"
84BUILD_ACTION=$(GNUMAKE)
85BUILD_FLAGS+= -j$(EXTMAXPROCESS)
86BUILD_DIR=$(CONFIGURE_DIR)
87.ELSE
88# there is no wntmsci build environment in the tarball; we use custom dmakefile
89BUILD_ACTION=dmake
90BUILD_DIR=$(CONFIGURE_DIR)$/src
91.ENDIF
92
93.ELSE # "WNT"
94
95.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
96LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
97.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
98.IF "$(OS)$(COM)"=="SOLARISC52"
99LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
100.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
101
102.IF "$(COM)"=="C52" && "$(CPU)"=="U"
103CFLAGS=-m64
104.EXPORT: CFLAGS
105.ENDIF
106
107# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
108CPPFLAGS+:=-I$(SOLARINCDIR)$/external
109LDFLAGS+:=-L$(SOLARLIBDIR)
110
111.IF "$(SYSBASE)"!=""
112CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
113.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
114LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
115.ENDIF
116.ENDIF			# "$(SYSBASE)"!=""
117
118CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
119LDFLAGS+:=$(EXTRA_LINKFLAGS)
120XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
121
122.EXPORT: CPPFLAGS
123.EXPORT: LDFLAGS
124.EXPORT: LIBXML2LIB
125.EXPORT: XSLTLIB
126
127CONFIGURE_DIR=
128CONFIGURE_ACTION=.$/configure
129# do not enable grddl parser (#i93768#)
130CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore       --with-regex-library=posix --with-decimal=none --with-www=xml
131BUILD_ACTION=$(GNUMAKE)
132BUILD_FLAGS+= -j$(EXTMAXPROCESS)
133BUILD_DIR=$(CONFIGURE_DIR)
134#INSTALL_ACTION=$(GNUMAKE) install
135#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
136.ENDIF
137
138
139OUT2INC+=src$/raptor.h
140
141.IF "$(OS)"=="MACOSX"
142OUT2LIB+=src$/.libs$/libraptor.$(RAPTOR_MAJOR).dylib src$/.libs$/libraptor.dylib
143OUT2BIN+=src/raptor-config
144.ELIF "$(OS)"=="WNT"
145.IF "$(COM)"=="GCC"
146OUT2LIB+=src$/.libs$/*.a
147OUT2BIN+=src$/.libs$/*.dll
148OUT2BIN+=src/raptor-config
149.ELSE
150# if we use dmake, this is done automagically
151.ENDIF
152.ELIF "$(GUI)"=="OS2"
153# if we use dmake, this is done automagically
154.ELSE
155OUT2LIB+=src$/.libs$/libraptor.so.$(RAPTOR_MAJOR) src$/.libs$/libraptor.so
156OUT2BIN+=src/raptor-config
157.ENDIF
158
159# --- Targets ------------------------------------------------------
160
161.INCLUDE : set_ext.mk
162.INCLUDE : target.mk
163.INCLUDE : tg_ext.mk
164
165