xref: /aoo42x/main/redland/rasqal/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_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"
58BUILD_ACTION=dmake
59BUILD_DIR=$(CONFIGURE_DIR)$/src
60ADDITIONAL_FILES+=src/windows.h
61OOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2
62.ELIF "$(OS)"=="WNT"
63.IF "$(COM)"=="GCC"
64rasqal_CC=$(CC) -mthreads
65.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
66rasqal_CC+=-shared-libgcc
67.ENDIF
68rasqal_LIBS=
69.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
70rasqal_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
71.ENDIF
72
73CONFIGURE_DIR=
74CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
75CONFIGURE_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)"
76BUILD_ACTION=$(GNUMAKE)
77BUILD_FLAGS+= -j$(EXTMAXPROCESS)
78BUILD_DIR=$(CONFIGURE_DIR)
79.ELSE
80# there is no wntmsci build environment in the tarball; we use custom dmakefile
81OOO_PATCH_FILES+= $(TARFILE_NAME).patch.win32
82CONFIGURE_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 && \
83	${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 && \
84	$(COPY) src/rasqal_config.h.in src/rasqal_config.h && \
85	$(COPY) src/snprintf.c src/rasqal_snprintf.c && \
86	$(COPY) libsv/sv.c src/sv.c
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" 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"
126CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-regex-library=posix --with-decimal=none
127.IF "$(SYSTEM_LIBXML)" == "NO"
128CONFIGURE_FLAGS+=--with-xml2-config=${SOLARVERSION}/${INPATH}/bin/xml2-config
129.ENDIF
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$/rasqal.h
139
140.IF "$(OS)"=="MACOSX"
141OUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
142OUT2BIN+=src/rasqal-config
143.ELIF "$(OS)"=="WNT"
144.IF "$(COM)"=="GCC"
145OUT2LIB+=src$/.libs$/*.a
146OUT2BIN+=src$/.libs$/*.dll
147OUT2BIN+=src/rasqal-config
148.ELSE
149# if we use dmake, this is done automagically
150.ENDIF
151.ELIF "$(OS)"=="OS2"
152# if we use dmake, this is done automagically
153.ELSE
154OUT2LIB+=src$/.libs$/librasqal.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so
155OUT2BIN+=src/rasqal-config
156.ENDIF
157
158# --- Targets ------------------------------------------------------
159
160.INCLUDE : set_ext.mk
161.INCLUDE : target.mk
162.INCLUDE : tg_ext.mk
163
164