xref: /aoo42x/main/redland/raptor/makefile.mk (revision 4513b4be)
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_raptor
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
43f78a4bb8StruckmanRAPTORVERSION=2.0.15
44cdf0e10cSrcweir
45f78a4bb8StruckmanTARFILE_NAME=raptor2-$(RAPTORVERSION)
46f78a4bb8StruckmanTARFILE_MD5=a39f6c07ddb20d7dd2ff1f95fa21e2cd
47cdf0e10cSrcweir
48cdf0e10cSrcweirADDITIONAL_FILES=src/makefile.mk src/raptor_config.h
49cdf0e10cSrcweir
50cdf0e10cSrcweirOOO_PATCH_FILES= \
5101edbebbSDon Lewis    $(TARFILE_NAME).patch.nspace \
52cdf0e10cSrcweir    $(TARFILE_NAME).patch.dmake \
53cdf0e10cSrcweir
54cdf0e10cSrcweirPATCH_FILES=$(OOO_PATCH_FILES)
55cdf0e10cSrcweir
56cdf0e10cSrcweir
57cdf0e10cSrcweir.IF "$(OS)"=="OS2"
58ab55ef1aSPedro GiffuniOOO_PATCH_FILES+=$(TARFILE_NAME).patch.os2
598a7c7384SYuri DarioCONFIGURE_DIR=
608a7c7384SYuri DarioCONFIGURE_ACTION=libtoolize && aclocal && autoconf && .$/configure
618a7c7384SYuri Dario# do not enable grddl parser (#i93768#)
628a7c7384SYuri DarioCONFIGURE_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=xml --prefix=$(PWD)/$(OUT) --includedir=(PWD)$/$(INCCOM) --libdir=$(PWD)$/$(LB)
638a7c7384SYuri DarioBUILD_ACTION=$(GNUMAKE)
648a7c7384SYuri DarioBUILD_FLAGS+= -j$(EXTMAXPROCESS)
658a7c7384SYuri DarioBUILD_DIR=$(CONFIGURE_DIR)
66cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
67cdf0e10cSrcweir.IF "$(COM)"=="GCC"
68cdf0e10cSrcweirOOO_PATCH_FILES+=$(TARFILE_NAME).patch.mingw
69cdf0e10cSrcweirraptor_CC=$(CC) -mthreads
70cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
71cdf0e10cSrcweirraptor_CC+=-shared-libgcc
72cdf0e10cSrcweir.ENDIF
73cdf0e10cSrcweirraptor_LIBS=
74cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
75cdf0e10cSrcweirraptor_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
76cdf0e10cSrcweir.ENDIF
77cdf0e10cSrcweir
78cdf0e10cSrcweirCONFIGURE_DIR=
79cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
80cdf0e10cSrcweir# do not enable grddl parser (#i93768#)
81f78a4bb8StruckmanCONFIGURE_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=xml --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)"
82cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
83cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
84cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
85cdf0e10cSrcweir.ELSE
86cdf0e10cSrcweir# there is no wntmsci build environment in the tarball; we use custom dmakefile
87f78a4bb8StruckmanOOO_PATCH_FILES+=$(TARFILE_NAME).patch.win32
88f78a4bb8StruckmanCONFIGURE_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 && \
89f78a4bb8Struckman	${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 && \
90f78a4bb8Struckman	$(COPY) src/raptor_config.h.in src/raptor_config.h
91cdf0e10cSrcweirBUILD_ACTION=dmake
92cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)$/src
93cdf0e10cSrcweir.ENDIF
94cdf0e10cSrcweir
95cdf0e10cSrcweir.ELSE # "WNT"
96cdf0e10cSrcweir
97*4513b4beSDamjan JovanovicOOO_PATCH_FILES+=$(TARFILE_NAME).patch
98cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
99cdf0e10cSrcweirLDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec
100cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
101cdf0e10cSrcweir.IF "$(OS)$(COM)"=="SOLARISC52"
102cdf0e10cSrcweirLDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
103cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="SOLARISC52"
104cdf0e10cSrcweir
1055ffc1918SJim Jagielski# Apple added availability annotiations to __darwin_check_fd_set_overflow to avoid the use of weak
1065ffc1918SJim Jagielski# and building with older deployment target fundamentally requires weak imports
1075ffc1918SJim Jagielski# Grrrrrr
1085ffc1918SJim Jagielski.IF "$(OS)"=="MACOSX"
1095ffc1918SJim JagielskiLDFLAGS+:=-Wl,-U,___darwin_check_fd_set_overflow
1105ffc1918SJim Jagielski.ENDIF                  #
1115ffc1918SJim Jagielski
112cdf0e10cSrcweir.IF "$(COM)"=="C52" && "$(CPU)"=="U"
113cdf0e10cSrcweirCFLAGS=-m64
114cdf0e10cSrcweir.EXPORT: CFLAGS
115cdf0e10cSrcweir.ENDIF
116cdf0e10cSrcweir
117cdf0e10cSrcweir# NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
118cdf0e10cSrcweirCPPFLAGS+:=-I$(SOLARINCDIR)$/external
119cdf0e10cSrcweirLDFLAGS+:=-L$(SOLARLIBDIR)
120cdf0e10cSrcweir
121cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
122cdf0e10cSrcweirCPPFLAGS+:=-I$(SYSBASE)$/usr$/include
123cdf0e10cSrcweir.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
124cdf0e10cSrcweirLDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
125cdf0e10cSrcweir.ENDIF
126cdf0e10cSrcweir.ENDIF			# "$(SYSBASE)"!=""
127cdf0e10cSrcweir
128cdf0e10cSrcweirCPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
129cdf0e10cSrcweirLDFLAGS+:=$(EXTRA_LINKFLAGS)
130cdf0e10cSrcweirXSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
131cdf0e10cSrcweir
132cdf0e10cSrcweir.EXPORT: CPPFLAGS
133cdf0e10cSrcweir.EXPORT: LDFLAGS
134cdf0e10cSrcweir.EXPORT: LIBXML2LIB
135cdf0e10cSrcweir.EXPORT: XSLTLIB
136cdf0e10cSrcweir
137cdf0e10cSrcweirCONFIGURE_DIR=
138cdf0e10cSrcweirCONFIGURE_ACTION=.$/configure
139cdf0e10cSrcweir# do not enable grddl parser (#i93768#)
140bcc6b0f7SJim JagielskiCONFIGURE_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=xml --prefix=$(PDW)/$(OUT) --includedir=$(PWD)/$(INCCOM) --libdir=$(PWD)/$(LB)
141f78a4bb8Struckman.IF "$(SYSTEM_LIBXML)" == "NO"
142f78a4bb8StruckmanCONFIGURE_FLAGS+=--with-xml2-config=${SOLARVERSION}/${INPATH}/bin/xml2-config \
143f78a4bb8Struckman	--with-xslt-config=${SOLARVERSION}/${INPATH}/bin/xslt-config
144f78a4bb8Struckman.ENDIF
145cdf0e10cSrcweirBUILD_ACTION=$(GNUMAKE)
146cdf0e10cSrcweirBUILD_FLAGS+= -j$(EXTMAXPROCESS)
147cdf0e10cSrcweirBUILD_DIR=$(CONFIGURE_DIR)
148cdf0e10cSrcweir#INSTALL_ACTION=$(GNUMAKE) install
149cdf0e10cSrcweir#INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
150cdf0e10cSrcweir.ENDIF
151cdf0e10cSrcweir
152cdf0e10cSrcweir
153f78a4bb8StruckmanOUT2INC+=src/raptor.h src/raptor2.h src/raptor_config.h
154cdf0e10cSrcweir
155cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
15687bf159bSJim JagielskiOUT2LIB+=src$/.libs$/libraptor2.$(RAPTOR_MAJOR).dylib src$/.libs$/libraptor2.dylib
157cdf0e10cSrcweir.ELIF "$(OS)"=="WNT"
158cdf0e10cSrcweir.IF "$(COM)"=="GCC"
159cdf0e10cSrcweirOUT2LIB+=src$/.libs$/*.a
160cdf0e10cSrcweirOUT2BIN+=src$/.libs$/*.dll
161cdf0e10cSrcweir.ELSE
162cdf0e10cSrcweir# if we use dmake, this is done automagically
163cdf0e10cSrcweir.ENDIF
164cdf0e10cSrcweir.ELIF "$(GUI)"=="OS2"
1658a7c7384SYuri DarioOUT2LIB+=src$/.libs$/*.a
1668a7c7384SYuri DarioOUT2BIN+=src$/.libs$/*.dll
167cdf0e10cSrcweir.ELSE
168f78a4bb8StruckmanOUT2LIB+=src$/.libs$/libraptor2.so.$(RAPTOR_MAJOR) src$/.libs$/libraptor2.so
169cdf0e10cSrcweir.ENDIF
170cdf0e10cSrcweir
171cdf0e10cSrcweir# --- Targets ------------------------------------------------------
172cdf0e10cSrcweir
173cdf0e10cSrcweir.INCLUDE : set_ext.mk
174cdf0e10cSrcweir.INCLUDE : target.mk
175cdf0e10cSrcweir.INCLUDE : tg_ext.mk
176cdf0e10cSrcweir
177