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=canvas 31TARGET=cairocanvas 32TARGETTYPE=GUI 33ENABLE_EXCEPTIONS=TRUE 34 35# --- Settings ----------------------------------------------------------- 36 37.INCLUDE : settings.mk 38DLLPRE = 39 40# --- Nothing to do if we're compiling with --disable-cairo-canvas ----------- 41.IF "$(ENABLE_CAIRO_CANVAS)" != "TRUE" 42@all: 43 @echo "Building without cairo support..." 44.ELSE 45# --- X11 Mac build currently doesn't work with cairo ----------- 46.IF "$(OS)" == "MACOSX" && "$(GUIBASE)" == "unx" 47@all: 48 @echo "Cannot build cairocanvas with X11..." 49.ENDIF 50.ENDIF 51 52# --- Common ---------------------------------------------------------- 53 54 55.IF "$(SYSTEM_CAIRO)" == "YES" 56CFLAGS+=$(CAIRO_CFLAGS) 57.ELSE 58CFLAGS+=-I$(SOLARINCDIR)/cairo 59.ENDIF 60 61.IF "$(verbose)"!="" || "$(VERBOSE)"!="" 62CDEFS+= -DVERBOSE 63.ENDIF 64.IF "$(L10N_framework)"=="" 65SLOFILES = $(SLO)$/cairo_cachedbitmap.obj \ 66 $(SLO)$/cairo_cairo.obj \ 67 $(SLO)$/cairo_canvas.obj \ 68 $(SLO)$/cairo_canvasbitmap.obj \ 69 $(SLO)$/cairo_canvascustomsprite.obj \ 70 $(SLO)$/cairo_canvasfont.obj \ 71 $(SLO)$/cairo_canvashelper.obj \ 72 $(SLO)$/cairo_canvashelper_text.obj \ 73 $(SLO)$/cairo_devicehelper.obj \ 74 $(SLO)$/cairo_services.obj \ 75 $(SLO)$/cairo_spritecanvas.obj \ 76 $(SLO)$/cairo_spritecanvashelper.obj \ 77 $(SLO)$/cairo_spritedevicehelper.obj \ 78 $(SLO)$/cairo_spritehelper.obj \ 79 $(SLO)$/cairo_textlayout.obj 80 81SHL1TARGET=$(TARGET).uno 82 83SHL1STDLIBS= $(CPPULIB) $(TKLIB) $(SALLIB) $(VCLLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(BASEGFXLIB) $(CANVASTOOLSLIB) $(TOOLSLIB) $(I18NISOLANGLIB) 84 85.IF "$(GUI)"=="UNX" 86 87.IF "$(SYSTEM_CAIRO)" == "YES" 88SHL1STDLIBS+= $(CAIRO_LIBS) 89.ELSE 90SHL1STDLIBS+= -lcairo -lpixman-1 91.ENDIF 92 93.IF "$(GUIBASE)"=="aqua" 94# native Mac OS X (Quartz) 95SLOFILES+= $(SLO)$/cairo_quartz_cairo.obj 96CFLAGSCXX+=$(OBJCXXFLAGS) 97.ELSE # "$(GUIBASE)"=="aqua" 98 99# Xlib 100SLOFILES+= $(SLO)$/cairo_xlib_cairo.obj 101SHL1STDLIBS+= -lfontconfig -lX11 -lXrender $(FREETYPE_LIBS) 102CFLAGS+=$(FREETYPE_CFLAGS) 103 104.ENDIF # "$(GUIBASE)"=="aqua" 105 106.ELSE # "$(GUI)"=="UNX" 107 108.IF "$(GUI)"=="WNT" 109SLOFILES+= $(SLO)$/cairo_win32_cairo.obj 110.IF "$(COM)"=="GCC" 111SHL1STDLIBS+= -lcairo 112.ELSE 113SHL1STDLIBS+= cairo.lib 114.ENDIF 115SHL1STDLIBS+= $(GDI32LIB) $(MSIMG32LIB) 116.ENDIF 117 118.ENDIF # "$(GUI)"=="UNX" 119 120SHL1IMPLIB=i$(TARGET) 121SHL1LIBS=$(SLB)$/$(TARGET).lib 122SHL1DEF=$(MISC)$/$(SHL1TARGET).def 123 124SHL1VERSIONMAP=$(SOLARENV)/src/component.map 125 126DEF1NAME=$(SHL1TARGET) 127DEF1EXPORTFILE=exports.dxp 128 129.ENDIF 130# ========================================================================== 131 132.INCLUDE : target.mk 133 134ALLTAR : $(MISC)/cairocanvas.component 135 136$(MISC)/cairocanvas.component .ERRREMOVE : \ 137 $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component 138 $(XSLTPROC) --nonet --stringparam uri \ 139 '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ 140 $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component 141