17871dc3eSAndrew Rist#************************************************************** 27871dc3eSAndrew Rist# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 107871dc3eSAndrew Rist# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 127871dc3eSAndrew Rist# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 197871dc3eSAndrew Rist# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweirPRJ=.. 25cdf0e10cSrcweir 26cdf0e10cSrcweirPRJNAME=redland 27cdf0e10cSrcweirTARGET=so_rasqal 28cdf0e10cSrcweir 29cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 30cdf0e10cSrcweir 31cdf0e10cSrcweir.INCLUDE : settings.mk 32cdf0e10cSrcweir 33cdf0e10cSrcweir.IF "$(SYSTEM_REDLAND)" == "YES" 34cdf0e10cSrcweirall: 35cdf0e10cSrcweir @echo "An already available installation of Redland RDF should exist on your system." 36cdf0e10cSrcweir @echo "Therefore the version provided here does not need to be built in addition." 37cdf0e10cSrcweir.ENDIF 38cdf0e10cSrcweir 39cdf0e10cSrcweir# --- Files -------------------------------------------------------- 40cdf0e10cSrcweir 41cdf0e10cSrcweir.INCLUDE : ../redlandversion.mk 42cdf0e10cSrcweir 43f78a4bb8StruckmanRASQALVERSION=0.9.33 44cdf0e10cSrcweir 45cdf0e10cSrcweirTARFILE_NAME=rasqal-$(RASQALVERSION) 46f78a4bb8StruckmanTARFILE_MD5=1f5def51ca0026cd192958ef07228b52 47cdf0e10cSrcweir 48f78a4bb8StruckmanADDITIONAL_FILES=src/makefile.mk 49cdf0e10cSrcweir 50cdf0e10cSrcweirOOO_PATCH_FILES= \ 51cdf0e10cSrcweir $(TARFILE_NAME).patch.ooo_build \ 52cdf0e10cSrcweir $(TARFILE_NAME).patch.dmake \ 53cdf0e10cSrcweir 54cdf0e10cSrcweirPATCH_FILES=$(OOO_PATCH_FILES) 55cdf0e10cSrcweir 56cdf0e10cSrcweir 57cdf0e10cSrcweir.IF "$(OS)"=="OS2" 588a7c7384SYuri DarioCONFIGURE_DIR= 598a7c7384SYuri DarioCONFIGURE_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' 608a7c7384SYuri DarioCONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-regex-library=posix --with-decimal=none 618a7c7384SYuri DarioBUILD_ACTION=$(GNUMAKE) 628a7c7384SYuri DarioBUILD_FLAGS+= -j$(EXTMAXPROCESS) 638a7c7384SYuri DarioBUILD_DIR=$(CONFIGURE_DIR) 64cdf0e10cSrcweir.ELIF "$(OS)"=="WNT" 65cdf0e10cSrcweir.IF "$(COM)"=="GCC" 66cdf0e10cSrcweirrasqal_CC=$(CC) -mthreads 67cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 68cdf0e10cSrcweirrasqal_CC+=-shared-libgcc 69cdf0e10cSrcweir.ENDIF 70cdf0e10cSrcweirrasqal_LIBS= 71cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 72cdf0e10cSrcweirrasqal_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 73cdf0e10cSrcweir.ENDIF 74cdf0e10cSrcweir 75cdf0e10cSrcweirCONFIGURE_DIR= 76cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH" 77cdf0e10cSrcweirCONFIGURE_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)" 78cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE) 79cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS) 80cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR) 81cdf0e10cSrcweir.ELSE 82cdf0e10cSrcweir# there is no wntmsci build environment in the tarball; we use custom dmakefile 83f78a4bb8StruckmanOOO_PATCH_FILES+= $(TARFILE_NAME).patch.win32 84f78a4bb8StruckmanCONFIGURE_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 && \ 85f78a4bb8Struckman ${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 && \ 86f78a4bb8Struckman $(COPY) src/rasqal_config.h.in src/rasqal_config.h && \ 87f78a4bb8Struckman $(COPY) src/snprintf.c src/rasqal_snprintf.c && \ 88f78a4bb8Struckman $(COPY) libsv/sv.c src/sv.c 89cdf0e10cSrcweirBUILD_ACTION=dmake 90cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)$/src 91cdf0e10cSrcweir.ENDIF 92cdf0e10cSrcweir.ELSE # "WNT" 93cdf0e10cSrcweir 94cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 95cdf0e10cSrcweirLDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec 96cdf0e10cSrcweir.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 97cdf0e10cSrcweir.IF "$(OS)$(COM)"=="SOLARISC52" 98cdf0e10cSrcweirLDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 99cdf0e10cSrcweir.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 100cdf0e10cSrcweir 101cdf0e10cSrcweir.IF "$(COM)"=="C52" && "$(CPU)"=="U" 102cdf0e10cSrcweirCFLAGS=-m64 103cdf0e10cSrcweir.EXPORT: CFLAGS 104cdf0e10cSrcweir.ENDIF 105cdf0e10cSrcweir 106cdf0e10cSrcweir# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto 107cdf0e10cSrcweirCPPFLAGS+:=-I$(SOLARINCDIR)$/external 108cdf0e10cSrcweirLDFLAGS+:=-L$(SOLARLIBDIR) 109cdf0e10cSrcweir 110cdf0e10cSrcweir.IF "$(SYSBASE)"!="" 111cdf0e10cSrcweirCPPFLAGS+:=-I$(SYSBASE)$/usr$/include 112cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX" 113cdf0e10cSrcweirLDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl 114cdf0e10cSrcweir.ENDIF 115cdf0e10cSrcweir.ENDIF # "$(SYSBASE)"!="" 116cdf0e10cSrcweir 117cdf0e10cSrcweirCPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS) 118cdf0e10cSrcweirLDFLAGS+:=$(EXTRA_LINKFLAGS) 119cdf0e10cSrcweirXSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config 120cdf0e10cSrcweir 121cdf0e10cSrcweir.EXPORT: CPPFLAGS 122cdf0e10cSrcweir.EXPORT: LDFLAGS 123cdf0e10cSrcweir.EXPORT: LIBXML2LIB 124cdf0e10cSrcweir.EXPORT: XSLTLIB 125cdf0e10cSrcweir 126cdf0e10cSrcweirCONFIGURE_DIR= 127f78a4bb8StruckmanCONFIGURE_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" 128*bcc6b0f7SJim JagielskiCONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-regex-library=posix --with-decimal=none --with-libgcrypt-config=no 129f78a4bb8Struckman.IF "$(SYSTEM_LIBXML)" == "NO" 130f78a4bb8StruckmanCONFIGURE_FLAGS+=--with-xml2-config=${SOLARVERSION}/${INPATH}/bin/xml2-config 131f78a4bb8Struckman.ENDIF 132cdf0e10cSrcweirBUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) 133cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS) 134cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR) 135cdf0e10cSrcweir#INSTALL_ACTION=$(GNUMAKE) install 136cdf0e10cSrcweir#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR) 137cdf0e10cSrcweir.ENDIF 138cdf0e10cSrcweir 139cdf0e10cSrcweir 140cdf0e10cSrcweirOUT2INC+=src$/rasqal.h 141cdf0e10cSrcweir 142cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 143cdf0e10cSrcweirOUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib 144cdf0e10cSrcweirOUT2BIN+=src/rasqal-config 145cdf0e10cSrcweir.ELIF "$(OS)"=="WNT" 146cdf0e10cSrcweir.IF "$(COM)"=="GCC" 147cdf0e10cSrcweirOUT2LIB+=src$/.libs$/*.a 148cdf0e10cSrcweirOUT2BIN+=src$/.libs$/*.dll 149cdf0e10cSrcweirOUT2BIN+=src/rasqal-config 150cdf0e10cSrcweir.ELSE 151cdf0e10cSrcweir# if we use dmake, this is done automagically 152cdf0e10cSrcweir.ENDIF 153cdf0e10cSrcweir.ELIF "$(OS)"=="OS2" 1548a7c7384SYuri DarioOUT2LIB+=src$/.libs$/*.a 1558a7c7384SYuri DarioOUT2BIN+=src$/.libs$/*.dll 156cdf0e10cSrcweir.ELSE 157cdf0e10cSrcweirOUT2LIB+=src$/.libs$/librasqal.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so 158cdf0e10cSrcweirOUT2BIN+=src/rasqal-config 159cdf0e10cSrcweir.ENDIF 160cdf0e10cSrcweir 161cdf0e10cSrcweir# --- Targets ------------------------------------------------------ 162cdf0e10cSrcweir 163cdf0e10cSrcweir.INCLUDE : set_ext.mk 164cdf0e10cSrcweir.INCLUDE : target.mk 165cdf0e10cSrcweir.INCLUDE : tg_ext.mk 166cdf0e10cSrcweir 167