xref: /aoo42x/main/redland/rasqal/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_rasqal
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
43RASQALVERSION=0.9.33
44
45TARFILE_NAME=rasqal-$(RASQALVERSION)
46TARFILE_MD5=1f5def51ca0026cd192958ef07228b52
47
48ADDITIONAL_FILES=src/makefile.mk
49
50OOO_PATCH_FILES= \
51    $(TARFILE_NAME).patch.ooo_build \
52    $(TARFILE_NAME).patch.dmake \
53
54PATCH_FILES=$(OOO_PATCH_FILES)
55
56
57.IF "$(OS)"=="OS2"
58CONFIGURE_DIR=
59CONFIGURE_ACTION=libtoolize && 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'
60CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-regex-library=posix --with-decimal=none
61BUILD_ACTION=$(GNUMAKE)
62BUILD_FLAGS+= -j$(EXTMAXPROCESS)
63BUILD_DIR=$(CONFIGURE_DIR)
64.ELIF "$(OS)"=="WNT"
65.IF "$(COM)"=="GCC"
66rasqal_CC=$(CC) -mthreads
67.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
68rasqal_CC+=-shared-libgcc
69.ENDIF
70rasqal_LIBS=
71.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
72rasqal_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
73.ENDIF
74
75CONFIGURE_DIR=
76CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
77CONFIGURE_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)"
78BUILD_ACTION=$(GNUMAKE)
79BUILD_FLAGS+= -j$(EXTMAXPROCESS)
80BUILD_DIR=$(CONFIGURE_DIR)
81.ELSE
82# there is no wntmsci build environment in the tarball; we use custom dmakefile
83OOO_PATCH_FILES+= $(TARFILE_NAME).patch.win32
84CONFIGURE_ACTION= ${PERL} -p -e '$$prefix="'$(PWD)/$(OUT)'"; $$libdir="'$(PWD)/$(LB)'"; $$incdir="'$(PWD)/$(INCCOM)'"; $$ldflags="-L$(SOLARLIBDIR) -lraptor2 -lm";' -e 's/\@prefix\@/$$prefix/; s/\@exec_prefix\@/\$${prefix}/; s/\@libdir\@/$$libdir/; s/\@includedir\@/$$incdir/; s/\@PACKAGE\@/rasqal/; s/\@VERSION\@/0.9.33/; s/\@PKG_CONFIG_REQUIRES\@/raptor2 >= 2.0.7/; s/\@RAPTOR_LDFLAGS\@/$$ldflags/;'  < rasqal.pc.in > rasqal.pc && \
85	${PERL} -p -e 's/\@RASQAL_VERSION_DECIMAL\@/933/;s/\@VERSION\@/0.9.33/;s/\@RASQAL_VERSION_MAJOR\@/0/;s/\@RASQAL_VERSION_MINOR\@/9/;s/\@RASQAL_VERSION_RELEASE\@/33/;s/\@HAVE_SYS_TIME_H\@/0/;s/\@HAVE_TIME_H\@/1/;s/\@RAPTOR_VERSION_DEC\@/2.0.15/' < src/rasqal.h.in > src/rasqal.h && \
86	$(COPY) src/rasqal_config.h.in src/rasqal_config.h && \
87	$(COPY) src/snprintf.c src/rasqal_snprintf.c && \
88	$(COPY) libsv/sv.c src/sv.c
89BUILD_ACTION=dmake
90BUILD_DIR=$(CONFIGURE_DIR)$/src
91.ENDIF
92.ELSE # "WNT"
93
94.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
95LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
96.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
97.IF "$(OS)$(COM)"=="SOLARISC52"
98LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
99.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
100
101.IF "$(COM)"=="C52" && "$(CPU)"=="U"
102CFLAGS=-m64
103.EXPORT: CFLAGS
104.ENDIF
105
106# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
107CPPFLAGS+:=-I$(SOLARINCDIR)$/external
108LDFLAGS+:=-L$(SOLARLIBDIR)
109
110.IF "$(SYSBASE)"!=""
111CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
112.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
113LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
114.ENDIF
115.ENDIF			# "$(SYSBASE)"!=""
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=
127CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH" RASQAL_CFLAGS=-I${PWD}$/..$/${INPATH}/inc RASQAL_LIBS="-L${PWD}/..$/${INPATH}/lib -lrasqual" 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_FLAGS=--disable-static --disable-gtk-doc --with-regex-library=posix --with-decimal=none
129.IF "$(SYSTEM_LIBXML)" == "NO"
130CONFIGURE_FLAGS+=--with-xml2-config=${SOLARVERSION}/${INPATH}/bin/xml2-config
131.ENDIF
132BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
133BUILD_FLAGS+= -j$(EXTMAXPROCESS)
134BUILD_DIR=$(CONFIGURE_DIR)
135#INSTALL_ACTION=$(GNUMAKE) install
136#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
137.ENDIF
138
139
140OUT2INC+=src$/rasqal.h
141
142.IF "$(OS)"=="MACOSX"
143OUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
144OUT2BIN+=src/rasqal-config
145.ELIF "$(OS)"=="WNT"
146.IF "$(COM)"=="GCC"
147OUT2LIB+=src$/.libs$/*.a
148OUT2BIN+=src$/.libs$/*.dll
149OUT2BIN+=src/rasqal-config
150.ELSE
151# if we use dmake, this is done automagically
152.ENDIF
153.ELIF "$(OS)"=="OS2"
154OUT2LIB+=src$/.libs$/*.a
155OUT2BIN+=src$/.libs$/*.dll
156.ELSE
157OUT2LIB+=src$/.libs$/librasqal.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so
158OUT2BIN+=src/rasqal-config
159.ENDIF
160
161# --- Targets ------------------------------------------------------
162
163.INCLUDE : set_ext.mk
164.INCLUDE : target.mk
165.INCLUDE : tg_ext.mk
166
167