xref: /trunk/main/redland/redland/makefile.mk (revision 8a7c7384)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=..
25
26PRJNAME=redland
27TARGET=so_redland
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :	settings.mk
32
33.IF "$(SYSTEM_REDLAND)" == "YES"
34all:
35	@echo "An already available installation of Redland RDF should exist on your system."
36	@echo "Therefore the version provided here does not need to be built in addition."
37.ENDIF
38
39# --- Files --------------------------------------------------------
40
41.INCLUDE :	../redlandversion.mk
42
43REDLANDVERSION=1.0.17
44
45TARFILE_NAME=redland-$(REDLANDVERSION)
46TARFILE_MD5=e5be03eda13ef68aabab6e42aa67715e
47
48ADDITIONAL_FILES=src/makefile.mk src/rdf_config.h
49
50OOO_PATCH_FILES= \
51    $(TARFILE_NAME).patch.autotools \
52    $(TARFILE_NAME).patch.dmake \
53    $(TARFILE_NAME).patch.ooo_build \
54
55PATCH_FILES=$(OOO_PATCH_FILES) \
56
57
58.IF "$(OS)"=="OS2"
59OOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2
60CONFIGURE_DIR=
61CONFIGURE_ACTION=libtoolize --force && aclocal && autoconf && .$/configure RAPTOR2_CFLAGS=-I${PWD}$/..$/${INPATH}/inc RAPTOR2_LIBS='-L${PWD}/..$/${INPATH}/lib -lraptor2 -lxml2 -lcurl' PKG_CONFIG_PATH='../raptor2-2.0.15;../rasqal-0.9.33'
62CONFIGURE_FLAGS=--disable-dependency-tracking --disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore -without-iodbc --without-unixodbc --without-datadirect --without-virtuoso --with-regex-library=posix --with-decimal=none --with-www=xml --disable-ltdl-install --disable-modular --without-included-ltdl --disable-ltdl-convenience
63BUILD_ACTION=$(GNUMAKE)
64BUILD_FLAGS+= -j$(EXTMAXPROCESS)
65BUILD_DIR=$(CONFIGURE_DIR)
66.ELIF "$(OS)"=="WNT"
67.IF "$(COM)"=="GCC"
68redland_CC=$(CC) -mthreads
69.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
70redland_CC+=-shared-libgcc
71.ENDIF
72redland_LIBS=
73.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
74redland_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
75.ENDIF
76
77CONFIGURE_DIR=
78CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
79CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --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="$(redland_CC)" CPPFLAGS="-nostdinc $(INCLUDE)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2,--export-all-symbols -L$(ILIB:s/;/ -L/)" LIBS="$(redland_LIBS)" OBJDUMP="$(WRAPCMD) objdump" LIBXML2LIB=$(LIBXML2LIB) XSLTLIB="$(XSLTLIB)"
80BUILD_ACTION=$(GNUMAKE)
81BUILD_FLAGS+= -j$(EXTMAXPROCESS)
82BUILD_DIR=$(CONFIGURE_DIR)
83.ELSE
84# there is no wntmsci build environment in the tarball; we use custom dmakefile
85OOO_PATCH_FILES+= $(TARFILE_NAME).patch.win32
86CONFIGURE_ACTION= \
87	$(COPY) src/rdf_config.h.in src/rdf_config.h
88BUILD_ACTION=dmake
89BUILD_DIR=$(CONFIGURE_DIR)$/src
90.ENDIF
91.ELSE # "WNT"
92
93.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
94LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
95.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
96.IF "$(OS)$(COM)"=="SOLARISC52"
97LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
98.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
99
100.IF "$(COM)"=="C52" && "$(CPU)"=="U"
101CFLAGS=-m64
102.EXPORT: CFLAGS
103.ENDIF
104
105# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
106CPPFLAGS+:=-I$(PWD)$/$(INCCOM) -I$(SOLARINCDIR)$/external
107LDFLAGS+:=-L$(PWD)$/$(LB) -L$(SOLARLIBDIR)
108
109.IF "$(SYSBASE)"!=""
110CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
111.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
112LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
113.ENDIF
114.ENDIF			# "$(SYSBASE)"!=""
115
116.IF "$(OS)"=="MACOSX"
117LDFLAGS+:=-Wl,-dylib_file,@loader_path/libraptor.1.dylib:$(PWD)/$(LB)/libraptor.1.dylib
118.ENDIF
119
120CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
121LDFLAGS+:=$(EXTRA_LINKFLAGS)
122XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
123
124.EXPORT: CPPFLAGS
125.EXPORT: LDFLAGS
126.EXPORT: LIBXML2LIB
127.EXPORT: XSLTLIB
128
129CONFIGURE_DIR=
130#CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH" RAPTOR2_CFLAGS=-I${PWD}$/..$/${INPATH}/inc RAPTOR2_LIBS="-L${PWD}/..$/${INPATH}/lib -lraptor2" PKG_CONFIG_PATH="../raptor2-2.0.15:../rasqal-0.9.33"
131CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH" PKG_CONFIG_PATH="../raptor2-2.0.15:../rasqal-0.9.33"
132CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --with-raptor=system --with-rasqual=system --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore -without-iodbc --without-unixodbc --without-datadirect --without-virtuoso --with-regex-library=posix --with-decimal=none --with-www=xml --disable-ltdl-install --disable-modular --without-included-ltdl --disable-ltdl-convenience
133BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
134BUILD_FLAGS+= -j$(EXTMAXPROCESS)
135BUILD_DIR=$(CONFIGURE_DIR)
136#INSTALL_ACTION=$(GNUMAKE) install
137#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
138.ENDIF
139
140
141OUT2INC+=src$/librdf.h src$/redland.h \
142    src$/rdf_concepts.h \
143    src$/rdf_digest.h \
144    src$/rdf_hash.h \
145    src$/rdf_init.h \
146    src$/rdf_iterator.h \
147    src$/rdf_list.h \
148    src$/rdf_log.h \
149    src$/rdf_model.h \
150    src$/rdf_node.h \
151    src$/rdf_parser.h \
152    src$/rdf_query.h \
153    src$/rdf_raptor.h \
154    src$/rdf_serializer.h \
155    src$/rdf_statement.h \
156    src$/rdf_storage.h \
157    src$/rdf_storage_module.h \
158    src$/rdf_stream.h \
159    src$/rdf_uri.h \
160    src$/rdf_utf8.h \
161
162.IF "$(OS)"=="MACOSX"
163OUT2LIB+=src$/.libs$/librdf.$(REDLAND_MAJOR).dylib
164.ELIF "$(OS)"=="WNT"
165.IF "$(COM)"=="GCC"
166OUT2LIB+=src$/.libs$/*.a
167OUT2BIN+=src$/.libs$/*.dll
168.ELSE
169# if we use dmake, this is done automagically
170.ENDIF
171.ELIF "$(OS)"=="OS2"
172OUT2LIB+=src$/.libs$/*.a
173OUT2BIN+=src$/.libs$/*.dll
174.ELSE
175OUT2LIB+=src$/.libs$/librdf.so.$(REDLAND_MAJOR)
176.ENDIF
177
178# --- Targets ------------------------------------------------------
179
180.INCLUDE : set_ext.mk
181.INCLUDE : target.mk
182.INCLUDE : tg_ext.mk
183
184