1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28PRJ=.. 29 30PRJNAME=cairo 31TARGET=so_cairo 32EXTERNAL_WARNINGS_NOT_ERRORS := TRUE 33 34# --- Settings ----------------------------------------------------- 35 36.INCLUDE : settings.mk 37 38.IF "$(ENABLE_CAIRO)" == "" 39all: 40 @echo "Nothing to do (Cairo not enabled)." 41 42.ELIF "$(SYSTEM_CAIRO)" == "YES" 43all: 44 @echo "Nothing to do, using system cairo." 45 46.ENDIF 47 48# --- Files -------------------------------------------------------- 49 50CAIROVERSION=1.8.0 51 52TARFILE_NAME=$(PRJNAME)-$(CAIROVERSION) 53TARFILE_MD5=4ea70ea87b47e92d318d4e7f5b940f47 54 55PATCH_FILES=..$/$(TARFILE_NAME).patch 56 57cairo_CFLAGS=$(SOLARINC) 58cairo_LDFLAGS=$(SOLARLIB) 59 60cairo_CPPFLAGS= 61 62.IF "$(SYSTEM_ZLIB)"!="YES" 63cairo_CPPFLAGS+=-I$(SOLARINCDIR)$/external$/zlib 64cairo_COMPRESS=z_compress 65.ELSE 66cairo_COMPRESS=compress 67.ENDIF 68cairo_CPPFLAGS+=$(INCLUDE) 69 70.IF "$(OS)"=="WNT" 71# --------- Windows ------------------------------------------------- 72.IF "$(COM)"=="GCC" 73cairo_LDFLAGS+=-no-undefined -L$(ILIB:s/;/ -L/) 74cairo_CPPFLAGS+=-nostdinc 75cairo_CC=$(CC) -mthreads 76 77.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 78cairo_CC+=-shared-libgcc 79.ENDIF 80.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 81cairo_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 82.ENDIF 83 84CONFIGURE_DIR= 85CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure 86CONFIGURE_FLAGS=--disable-xlib --disable-ft --disable-pthread --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no --build=i586-pc-mingw32 --host=i586-pc-mingw32 PKG_CONFIG=./dummy_pkg_config CC="$(cairo_CC)" LIBS="$(cairo_LIBS)" ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) OBJDUMP="$(WRAPCMD) objdump" 87BUILD_ACTION=$(GNUMAKE) 88BUILD_FLAGS+= -j$(EXTMAXPROCESS) 89BUILD_DIR=$(CONFIGURE_DIR) 90.IF "$(GUI)$(COM)"=="WNTGCC" 91.EXPORT : PWD 92.ENDIF 93 94.ELSE # WNT, not GCC 95BUILD_ACTION=$(GNUMAKE) -f Makefile.win32 CFG=release 96BUILD_DIR= 97.ENDIF 98 99OUT2INC+=src$/cairo-win32.h 100 101.ELIF "$(GUIBASE)"=="aqua" 102# ----------- Native Mac OS X (Aqua/Quartz) -------------------------------- 103.IF "$(SYSBASE)"!="" 104.IF "$(EXTRA_CFLAGS)" != "" 105cairo_CFLAGS+=$(EXTRA_CFLAGS) $(EXTRA_CDEFS) 106cairo_CPPFLAGS+=$(EXTRA_CFLAGS) $(EXTRA_CDEFS) 107.ENDIF # "$(EXTRA_CFLAGS)" != "" 108.ENDIF # "$(SYSBASE)"!="" 109CONFIGURE_DIR= 110CONFIGURE_ACTION=cp $(SRC_ROOT)$/$(PRJNAME)$/cairo$/dummy_pkg_config . && .$/configure 111CONFIGURE_FLAGS=--enable-static=no --disable-xlib --disable-ft --disable-svg --enable-quartz --enable-quartz-font --enable-gtk-doc=no --enable-test-surfaces=no PKG_CONFIG=./dummy_pkg_config ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) 112cairo_CPPFLAGS+=$(EXTRA_CDEFS) 113cairo_LDFLAGS+=$(EXTRA_LINKFLAGS) 114BUILD_ACTION=$(GNUMAKE) 115BUILD_FLAGS+= -j$(EXTMAXPROCESS) 116BUILD_DIR=$(CONFIGURE_DIR) 117 118OUT2INC+=src$/cairo-quartz.h 119 120.ELSE 121# ----------- Unix --------------------------------------------------------- 122.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 123cairo_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec 124.ELIF "$(OS)$(COM)"=="SOLARISC52" 125cairo_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 126.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 127 128.IF "$(SYSBASE)"!="" 129cairo_CFLAGS+=-I$(SYSBASE)$/usr$/include -I$(SOLARINCDIR)$/external $(EXTRA_CFLAGS) 130.IF "$(OS)"=="SOLARIS" || "$(OS)"=="LINUX" 131cairo_LDFLAGS+=-L$(SYSBASE)$/lib -L$(SYSBASE)$/usr$/lib -L$(SOLARLIBDIR) -lpthread -ldl 132.ENDIF 133.ENDIF # "$(SYSBASE)"!="" 134 135LDFLAGS:=$(cairo_LDFLAGS) 136.EXPORT: LDFLAGS 137 138.IF "$(COMNAME)"=="sunpro5" 139cairo_CFLAGS+=-xc99=none 140.ENDIF 141 142.IF "$(CPU)"=="I" 143cairo_CFLAGS+=-march=i486 144.ENDIF 145 146CONFIGURE_DIR= 147CONFIGURE_ACTION=.$/configure 148CONFIGURE_FLAGS=--enable-xlib --enable-ft --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no --enable-static=no ZLIB3RDLIB=$(ZLIB3RDLIB) COMPRESS=$(cairo_COMPRESS) 149BUILD_ACTION=$(GNUMAKE) 150BUILD_FLAGS+= -j$(EXTMAXPROCESS) 151BUILD_DIR=$(CONFIGURE_DIR) 152 153OUT2INC+=src$/cairo-xlib.h \ 154 src$/cairo-xlib-xrender.h \ 155 src$/cairo-ft.h 156 157.ENDIF 158 159 160# -------- All platforms -------------------------------------------- 161 162.IF "$(OS)" != "WNT" || "$(COM)" == "GCC" 163# all other platforms except vanilla WNT, which does not use configure 164 165.IF "$(BUILD_PIXMAN)" == "YES" 166# pixman is in this module 167# We include paths to this module also in LDFLAGS/CFLAGS to guarantee search order. 168# However pixman_* vars need to be also set for configure to work properly on all platforms. 169CONFIGURE_FLAGS+=pixman_CFLAGS="-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc" pixman_LIBS="-L$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/lib -lpixman-1" 170.ENDIF 171 172CONFIGURE_FLAGS+=CFLAGS="-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc $(cairo_CFLAGS)" LDFLAGS="-L$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/lib $(cairo_LDFLAGS)" CPPFLAGS="$(cairo_CPPFLAGS)" 173 174.ENDIF 175 176.IF "$(SYSTEM_LIBPNG)" != "YES" 177CONFIGURE_FLAGS+=png_CFLAGS="-I$(SOLARINCDIR)$/external$/libpng" png_LIBS="-L$(SOLARLIBDIR) -lpng" 178.ENDIF 179 180 181OUT2INC+=cairo-version.h \ 182 src$/cairo-deprecated.h \ 183 src$/cairo-features.h \ 184 src$/cairo-pdf.h \ 185 src$/cairo-ps.h \ 186 src$/cairo.h 187 188.IF "$(OS)"=="MACOSX" 189EXTRPATH=LOADER 190OUT2LIB+=src$/.libs$/libcairo*.dylib 191.ELIF "$(OS)"=="WNT" 192.IF "$(COM)"=="GCC" 193OUT2BIN+=src$/.libs$/*.a 194OUT2BIN+=src$/.libs$/*.dll 195.ELSE 196OUT2LIB+=src$/release$/*.lib 197OUT2BIN+=src$/release$/*.dll 198.ENDIF 199.ELSE 200OUT2LIB+=src$/.libs$/libcairo.so* 201.ENDIF 202 203# --- Targets ------------------------------------------------------ 204 205.INCLUDE : set_ext.mk 206.INCLUDE : target.mk 207.INCLUDE : tg_ext.mk 208 209