Update ooo320-m1
[ooovba.git] / redland / rasqal / makefile.mk
blobc7ae0ed07df40855274605b0a0a5e08fbbd89634
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
11 # $Revision: 1.8.2.2 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 PRJ=..
34 PRJNAME=redland
35 TARGET=so_rasqal
37 # --- Settings -----------------------------------------------------
39 .INCLUDE : settings.mk
41 .IF "$(SYSTEM_REDLAND)" == "YES"
42 all:
43 @echo "An already available installation of Redland RDF should exist on your system."
44 @echo "Therefore the version provided here does not need to be built in addition."
45 .ENDIF
47 # --- Files --------------------------------------------------------
49 .INCLUDE : ../redlandversion.mk
51 RASQALVERSION=0.9.16
53 TARFILE_NAME=rasqal-$(RASQALVERSION)
55 ADDITIONAL_FILES=src/makefile.mk src/rasqal_config.h
57 OOO_PATCH_FILES= \
58 $(TARFILE_NAME).patch.legal \
59 $(TARFILE_NAME).patch.autotools \
60 $(TARFILE_NAME).patch.ooo_build \
61 $(TARFILE_NAME).patch.dmake \
62 $(TARFILE_NAME).patch.win32 \
65 PATCH_FILES=$(OOO_PATCH_FILES)
68 .IF "$(OS)"=="OS2"
69 BUILD_ACTION=dmake
70 BUILD_DIR=$(CONFIGURE_DIR)$/src
71 .ELIF "$(OS)"=="WNT"
72 .IF "$(COM)"=="GCC"
73 rasqal_CC=$(CC)
74 .IF "$(MINGW_SHARED_GCCLIB)"=="YES"
75 rasqal_CC+=-shared-libgcc
76 .ENDIF
77 rasqal_LIBS=-lmingwthrd
78 .IF "$(MINGW_SHARED_GXXLIB)"=="YES"
79 rasqal_LIBS+=-lstdc++_s
80 .ENDIF
82 CONFIGURE_DIR=
83 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
84 CONFIGURE_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)" CFLAGS=-D_MT CPPFLAGS="-nostdinc $(INCLUDE)" LDFLAGS="-no-undefined -Wl,--enable-runtime-pseudo-reloc,--export-all-symbols -L$(ILIB:s/;/ -L/)" LIBS="$(rasqal_LIBS)" OBJDUMP="$(WRAPCMD) objdump" LIBXML2LIB=$(LIBXML2LIB) XSLTLIB="$(XSLTLIB)"
85 BUILD_ACTION=$(GNUMAKE)
86 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
87 BUILD_DIR=$(CONFIGURE_DIR)
88 .ELSE
89 # there is no wntmsci build environment in the tarball; we use custom dmakefile
90 BUILD_ACTION=dmake
91 BUILD_DIR=$(CONFIGURE_DIR)$/src
92 .ENDIF
93 .ELSE # "WNT"
95 .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC"
96 LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec -Wl,-z,noexecstack
97 .ENDIF # "$(OS)$(COM)"=="LINUXGCC"
98 .IF "$(OS)$(COM)"=="SOLARISC52"
99 LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
100 .ENDIF # "$(OS)$(COM)"=="SOLARISC52"
102 .IF "$(COM)"=="C52" && "$(CPU)"=="U"
103 CFLAGS=-m64
104 .EXPORT: CFLAGS
105 .ENDIF
107 # NB: SOLARDIR before SYSBASE, because linux SYSBASE contains obsolete libcrypto
108 CPPFLAGS+:=-I$(SOLARINCDIR)$/external
109 LDFLAGS+:=-L$(SOLARLIBDIR)
111 .IF "$(SYSBASE)"!=""
112 CPPFLAGS+:=-I$(SYSBASE)$/usr$/include
113 .IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX"
114 LDFLAGS+:=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -lpthread -ldl
115 .ENDIF
116 .ENDIF # "$(SYSBASE)"!=""
118 CPPFLAGS+:=$(EXTRA_CDEFS) $(EXTRA_CFLAGS)
119 LDFLAGS+:=$(EXTRA_LINKFLAGS)
120 XSLTLIB!:=$(XSLTLIB) # expand dmake variables for xslt-config
122 .EXPORT: CPPFLAGS
123 .EXPORT: LDFLAGS
124 .EXPORT: LIBXML2LIB
125 .EXPORT: XSLTLIB
127 CONFIGURE_DIR=
128 CONFIGURE_ACTION=.$/configure PATH="..$/..$/..$/bin:$$PATH"
129 CONFIGURE_FLAGS=--disable-static --disable-gtk-doc --with-threads --with-openssl-digests --with-xml-parser=libxml --without-bdb --without-sqlite --without-mysql --without-postgresql --without-threestore --with-regex-library=posix --with-decimal=none --with-www=xml
130 BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE)
131 BUILD_FLAGS+= -j$(EXTMAXPROCESS)
132 BUILD_DIR=$(CONFIGURE_DIR)
133 #INSTALL_ACTION=$(GNUMAKE) install
134 #INSTALL_FLAGS+=DESTDIR=$(PWD)$/$(P_INSTALL_TARGET_DIR)
135 .ENDIF
138 OUT2INC+=src$/rasqal.h
140 .IF "$(OS)"=="MACOSX"
141 OUT2LIB+=src$/.libs$/librasqal.$(RASQAL_MAJOR).dylib src$/.libs$/librasqal.dylib
142 OUT2BIN+=src/rasqal-config
143 .ELIF "$(OS)"=="WNT"
144 .IF "$(COM)"=="GCC"
145 OUT2LIB+=src$/.libs$/*.a
146 OUT2BIN+=src$/.libs$/*.dll
147 OUT2BIN+=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
154 OUT2LIB+=src$/.libs$/librasqal.so.$(RASQAL_MAJOR) src$/.libs$/librasqal.so
155 OUT2BIN+=src/rasqal-config
156 .ENDIF
158 # --- Targets ------------------------------------------------------
160 .INCLUDE : set_ext.mk
161 .INCLUDE : target.mk
162 .INCLUDE : tg_ext.mk