xref: /trunk/main/redland/redland/makefile.mk (revision f78a4bb8)
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"
59BUILD_ACTION=dmake
60BUILD_DIR=$(CONFIGURE_DIR)$/librdf
61ADDITIONAL_FILES+=librdf/windows.h
62OOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2
63.ELIF "$(OS)"=="WNT"
64.IF "$(COM)"=="GCC"
65redland_CC=$(CC) -mthreads
66.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
67redland_CC+=-shared-libgcc
68.ENDIF
69redland_LIBS=
70.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
71redland_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
72.ENDIF
73
74CONFIGURE_DIR=
75CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
76CONFIGURE_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)"
77BUILD_ACTION=$(GNUMAKE)
78BUILD_FLAGS+= -j$(EXTMAXPROCESS)
79BUILD_DIR=$(CONFIGURE_DIR)
80.ELSE
81# there is no wntmsci build environment in the tarball; we use custom dmakefile
82OOO_PATCH_FILES+= $(TARFILE_NAME).patch.win32
83CONFIGURE_ACTION= \
84	$(COPY) src/rdf_config.h.in src/rdf_config.h
85BUILD_ACTION=dmake
86BUILD_DIR=$(CONFIGURE_DIR)$/src
87.ENDIF
88.ELSE # "WNT"
89
90.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
91LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
92.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
93.IF "$(OS)$(COM)"=="SOLARISC52"
94LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
95.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
96
97.IF "$(COM)"=="C52" && "$(CPU)"=="U"
98CFLAGS=-m64
99.EXPORT: CFLAGS
100.ENDIF
101
102# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
103CPPFLAGS+:=-I$(PWD)$/$(INCCOM) -I$(SOLARINCDIR)$/external
104LDFLAGS+:=-L$(PWD)$/$(LB) -L$(SOLARLIBDIR)
105
106.IF "$(SYSBASE)"!=""
107CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
108.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
109LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
110.ENDIF
111.ENDIF			# "$(SYSBASE)"!=""
112
113.IF "$(OS)"=="MACOSX"
114LDFLAGS+:=-Wl,-dylib_file,@loader_path/libraptor.1.dylib:$(PWD)/$(LB)/libraptor.1.dylib
115.ENDIF
116
117CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
118LDFLAGS+:=$(EXTRA_LINKFLAGS)
119XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
120
121.EXPORT: CPPFLAGS
122.EXPORT: LDFLAGS
123.EXPORT: LIBXML2LIB
124.EXPORT: XSLTLIB
125
126CONFIGURE_DIR=
127#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"
128CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH" PKG_CONFIG_PATH="../raptor2-2.0.15:../rasqal-0.9.33"
129CONFIGURE_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
130BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
131BUILD_FLAGS+= -j$(EXTMAXPROCESS)
132BUILD_DIR=$(CONFIGURE_DIR)
133#INSTALL_ACTION=$(GNUMAKE) install
134#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
135.ENDIF
136
137
138OUT2INC+=src$/librdf.h src$/redland.h \
139    src$/rdf_concepts.h \
140    src$/rdf_digest.h \
141    src$/rdf_hash.h \
142    src$/rdf_init.h \
143    src$/rdf_iterator.h \
144    src$/rdf_list.h \
145    src$/rdf_log.h \
146    src$/rdf_model.h \
147    src$/rdf_node.h \
148    src$/rdf_parser.h \
149    src$/rdf_query.h \
150    src$/rdf_raptor.h \
151    src$/rdf_serializer.h \
152    src$/rdf_statement.h \
153    src$/rdf_storage.h \
154    src$/rdf_storage_module.h \
155    src$/rdf_stream.h \
156    src$/rdf_uri.h \
157    src$/rdf_utf8.h \
158
159.IF "$(OS)"=="MACOSX"
160OUT2LIB+=src$/.libs$/librdf.$(REDLAND_MAJOR).dylib
161.ELIF "$(OS)"=="WNT"
162.IF "$(COM)"=="GCC"
163OUT2LIB+=src$/.libs$/*.a
164OUT2BIN+=src$/.libs$/*.dll
165.ELSE
166# if we use dmake, this is done automagically
167.ENDIF
168.ELIF "$(OS)"=="OS2"
169# if we use dmake, this is done automagically
170.ELSE
171OUT2LIB+=src$/.libs$/librdf.so.$(REDLAND_MAJOR)
172.ENDIF
173
174# --- Targets ------------------------------------------------------
175
176.INCLUDE : set_ext.mk
177.INCLUDE : target.mk
178.INCLUDE : tg_ext.mk
179
180