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_raptor 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 43RAPTORVERSION=2.0.15 44 45TARFILE_NAME=raptor2-$(RAPTORVERSION) 46TARFILE_MD5=a39f6c07ddb20d7dd2ff1f95fa21e2cd 47 48ADDITIONAL_FILES=src/makefile.mk src/raptor_config.h 49 50OOO_PATCH_FILES= \ 51 $(TARFILE_NAME).patch.nspace \ 52 $(TARFILE_NAME).patch.dmake \ 53 54PATCH_FILES=$(OOO_PATCH_FILES) 55 56 57.IF "$(OS)"=="OS2" 58OOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2 59CONFIGURE_DIR= 60CONFIGURE_ACTION=libtoolize && aclocal && autoconf && .$/configure 61# do not enable grddl parser (#i93768#) 62# www=none: see the unix/macOS stanza near the bottom of this file for why 63CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-openssl-digests --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=none --prefix=$(PWD)/$(OUT) --includedir=(PWD)$/$(INCCOM) --libdir=$(PWD)$/$(LB) 64BUILD_ACTION=$(GNUMAKE) 65BUILD_FLAGS+= -j$(EXTMAXPROCESS) 66BUILD_DIR=$(CONFIGURE_DIR) 67.ELIF "$(OS)"=="WNT" 68.IF "$(COM)"=="GCC" 69OOO_PATCH_FILES+=$(TARFILE_NAME).patch.mingw 70raptor_CC=$(CC) -mthreads 71.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 72raptor_CC+=-shared-libgcc 73.ENDIF 74raptor_LIBS= 75.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 76raptor_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 77.ENDIF 78 79CONFIGURE_DIR= 80CONFIGURE_ACTION=.$/configure 81# do not enable grddl parser (#i93768#) 82# www=none: see the unix/macOS stanza near the bottom of this file for why 83CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-openssl-digests --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=none --build=i586-pc-mingw32 --host=i586-pc-mingw32 lt_cv_cc_dll_switch="-shared" --prefix=$(PWD)/$(OUT) --includedir=(PWD)$/$(INCCOM) --libdir=$(PWD)$/$(LB) --CC="$(raptor_CC)" CPPFLAGS="-nostdinc $(INCLUDE)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc-v2,--export-all-symbols -L$(ILIB:s/;/ -L/)" LIBS="$(raptor_LIBS)" OBJDUMP="$(WRAPCMD) objdump" LIBXML2LIB=$(LIBXML2LIB) XSLTLIB="$(XSLTLIB)" 84BUILD_ACTION=$(GNUMAKE) 85BUILD_FLAGS+= -j$(EXTMAXPROCESS) 86BUILD_DIR=$(CONFIGURE_DIR) 87.ELSE 88# there is no wntmsci build environment in the tarball; we use custom dmakefile 89OOO_PATCH_FILES+=$(TARFILE_NAME).patch.win32 90CONFIGURE_ACTION= ${PERL} -p -e '$$prefix="'$(PWD)/$(OUT)'"; $$libdir="'$(PWD)/$(LB)'"; $$incdir="'$(PWD)/$(INCCOM)'"; $$ldflags="-L$(SOLARLIBDIR) -lxml2 -lm";' -e 's/\@prefix\@/$$prefix/; s/\@exec_prefix\@/\$${prefix}/; s/\@libdir\@/$$libdir/; s/\@includedir\@/$$incdir/; s/\@PACKAGE\@/raptor2/; s/\@VERSION\@/2.0.15/; s/\@PKG_CONFIG_REQUIRES\@//; s/\@RAPTOR_LDFLAGS\@/$$ldflags/;' < raptor2.pc.in > raptor2.pc && \ 91 ${PERL} -p -e 's/\@RAPTOR_VERSION_DECIMAL\@/20015/;s/\@VERSION\@/2.0.15/;s/\@RAPTOR_VERSION_MAJOR\@/2/;s/\@RAPTOR_VERSION_MINOR\@/0/;s/\@RAPTOR_VERSION_RELEASE\@/15/' < src/raptor2.h.in > src/raptor2.h && \ 92 $(COPY) src/raptor_config.h.in src/raptor_config.h 93BUILD_ACTION=dmake 94BUILD_DIR=$(CONFIGURE_DIR)$/src 95.ENDIF 96 97.ELSE # "WNT" 98 99OOO_PATCH_FILES+=$(TARFILE_NAME).patch 100.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 101LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec 102.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 103.IF "$(OS)$(COM)"=="SOLARISC52" 104LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 105.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 106 107# Apple added availability annotiations to __darwin_check_fd_set_overflow to avoid the use of weak 108# and building with older deployment target fundamentally requires weak imports 109# Grrrrrr 110.IF "$(OS)"=="MACOSX" 111LDFLAGS+:=-Wl,-U,___darwin_check_fd_set_overflow 112.ENDIF # 113 114.IF "$(COM)"=="C52" && "$(CPU)"=="U" 115CFLAGS=-m64 116.EXPORT: CFLAGS 117.ENDIF 118 119# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto 120CPPFLAGS+:=-I$(SOLARINCDIR)$/external 121LDFLAGS+:=-L$(SOLARLIBDIR) 122 123.IF "$(SYSBASE)"!="" 124CPPFLAGS+:=-I$(SYSBASE)$/usr$/include 125.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX" 126LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl 127.ENDIF 128.ENDIF # "$(SYSBASE)"!="" 129 130CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS) 131LDFLAGS+:=$(EXTRA_LINKFLAGS) 132XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config 133 134.EXPORT: CPPFLAGS 135.EXPORT: LDFLAGS 136.EXPORT: LIBXML2LIB 137.EXPORT: XSLTLIB 138 139CONFIGURE_DIR= 140CONFIGURE_ACTION=.$/configure 141# do not enable grddl parser (#i93768#) 142# www=none: raptor's URI-fetch backend is both unused and unbuildable here. 143# Unused: grddl, the only parser that dereferences remote URIs, is excluded 144# above, and AOO's own RDF consumer (unoxml/source/rdf/librdf_repository.cxx) 145# only ever parses local streams; curl is off too (--with-curl-config=no below). 146# Unbuildable: the libxml backend calls xmlNanoHTTP*, removed in libxml2 2.12. 147CONFIGURE_FLAGS=--with-threads --with-curl-config=no --with-icu-config=no --disable-static --disable-gtk-doc --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=none --prefix=$(PDW)/$(OUT) --includedir=$(PWD)/$(INCCOM) --libdir=$(PWD)/$(LB) 148.IF "$(SYSTEM_LIBXML)" == "NO" 149CONFIGURE_FLAGS+=--with-xml2-config=${SOLARVERSION}/${INPATH}/bin/xml2-config \ 150 --with-xslt-config=${SOLARVERSION}/${INPATH}/bin/xslt-config 151.ENDIF 152BUILD_ACTION=$(GNUMAKE) 153BUILD_FLAGS+= -j$(EXTMAXPROCESS) 154BUILD_DIR=$(CONFIGURE_DIR) 155#INSTALL_ACTION=$(GNUMAKE) install 156#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR) 157.ENDIF 158 159 160OUT2INC+=src/raptor.h src/raptor2.h src/raptor_config.h 161 162.IF "$(OS)"=="MACOSX" 163OUT2LIB+=src$/.libs$/libraptor2.$(RAPTOR_MAJOR).dylib src$/.libs$/libraptor2.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 "$(GUI)"=="OS2" 172OUT2LIB+=src$/.libs$/*.a 173OUT2BIN+=src$/.libs$/*.dll 174.ELSE 175OUT2LIB+=src$/.libs$/libraptor2.so.$(RAPTOR_MAJOR) src$/.libs$/libraptor2.so 176.ENDIF 177 178# --- Targets ------------------------------------------------------ 179 180.INCLUDE : set_ext.mk 181.INCLUDE : target.mk 182.INCLUDE : tg_ext.mk 183