xref: /aoo4110/main/canvas/source/cairo/makefile.mk (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski#**************************************************************
2*b1cdbd2cSJim Jagielski#
3*b1cdbd2cSJim Jagielski#  Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski#  or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski#  distributed with this work for additional information
6*b1cdbd2cSJim Jagielski#  regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski#  to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski#  "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski#  with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski#
11*b1cdbd2cSJim Jagielski#    http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski#
13*b1cdbd2cSJim Jagielski#  Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski#  software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski#  KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski#  specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski#  under the License.
19*b1cdbd2cSJim Jagielski#
20*b1cdbd2cSJim Jagielski#**************************************************************
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim JagielskiPRJ=..$/..
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim JagielskiPRJNAME=canvas
27*b1cdbd2cSJim JagielskiTARGET=cairocanvas
28*b1cdbd2cSJim JagielskiTARGETTYPE=GUI
29*b1cdbd2cSJim JagielskiENABLE_EXCEPTIONS=TRUE
30*b1cdbd2cSJim Jagielski
31*b1cdbd2cSJim Jagielski# --- Settings -----------------------------------------------------------
32*b1cdbd2cSJim Jagielski
33*b1cdbd2cSJim Jagielski.INCLUDE :	settings.mk
34*b1cdbd2cSJim JagielskiDLLPRE =
35*b1cdbd2cSJim Jagielski
36*b1cdbd2cSJim Jagielski# --- Nothing to do if we're compiling with --disable-cairo-canvas -----------
37*b1cdbd2cSJim Jagielski.IF "$(ENABLE_CAIRO_CANVAS)" != "TRUE"
38*b1cdbd2cSJim Jagielski@all:
39*b1cdbd2cSJim Jagielski	@echo "Building without cairo support..."
40*b1cdbd2cSJim Jagielski.ELSE
41*b1cdbd2cSJim Jagielski# --- X11 Mac build currently doesn't work with cairo -----------
42*b1cdbd2cSJim Jagielski.IF "$(OS)" == "MACOSX" && "$(GUIBASE)" == "unx"
43*b1cdbd2cSJim Jagielski@all:
44*b1cdbd2cSJim Jagielski	@echo "Cannot build cairocanvas with X11..."
45*b1cdbd2cSJim Jagielski.ENDIF
46*b1cdbd2cSJim Jagielski.ENDIF
47*b1cdbd2cSJim Jagielski
48*b1cdbd2cSJim Jagielski# --- Common ----------------------------------------------------------
49*b1cdbd2cSJim Jagielski
50*b1cdbd2cSJim Jagielski
51*b1cdbd2cSJim Jagielski.IF "$(SYSTEM_CAIRO)" == "YES"
52*b1cdbd2cSJim JagielskiCFLAGS+=$(CAIRO_CFLAGS)
53*b1cdbd2cSJim Jagielski.ELSE
54*b1cdbd2cSJim JagielskiCFLAGS+=-I$(SOLARINCDIR)/cairo
55*b1cdbd2cSJim Jagielski.ENDIF
56*b1cdbd2cSJim Jagielski
57*b1cdbd2cSJim Jagielski.IF "$(verbose)"!="" || "$(VERBOSE)"!=""
58*b1cdbd2cSJim JagielskiCDEFS+= -DVERBOSE
59*b1cdbd2cSJim Jagielski.ENDIF
60*b1cdbd2cSJim Jagielski.IF "$(L10N_framework)"==""
61*b1cdbd2cSJim JagielskiSLOFILES =	$(SLO)$/cairo_cachedbitmap.obj \
62*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_cairo.obj \
63*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvas.obj \
64*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvasbitmap.obj \
65*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvascustomsprite.obj \
66*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvasfont.obj \
67*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvashelper.obj \
68*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_canvashelper_text.obj \
69*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_devicehelper.obj \
70*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_services.obj \
71*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_spritecanvas.obj \
72*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_spritecanvashelper.obj \
73*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_spritedevicehelper.obj \
74*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_spritehelper.obj \
75*b1cdbd2cSJim Jagielski			$(SLO)$/cairo_textlayout.obj
76*b1cdbd2cSJim Jagielski
77*b1cdbd2cSJim JagielskiSHL1TARGET=$(TARGET).uno
78*b1cdbd2cSJim Jagielski
79*b1cdbd2cSJim JagielskiSHL1STDLIBS= $(CPPULIB) $(TKLIB) $(SALLIB) $(VCLLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(BASEGFXLIB) $(CANVASTOOLSLIB) $(TOOLSLIB) $(I18NISOLANGLIB)
80*b1cdbd2cSJim Jagielski
81*b1cdbd2cSJim Jagielski.IF "$(GUI)"=="UNX"
82*b1cdbd2cSJim Jagielski
83*b1cdbd2cSJim Jagielski.IF "$(SYSTEM_CAIRO)" == "YES"
84*b1cdbd2cSJim JagielskiSHL1STDLIBS+= $(CAIRO_LIBS)
85*b1cdbd2cSJim Jagielski.ELSE
86*b1cdbd2cSJim JagielskiSHL1STDLIBS+= -lcairo -lpixman-1
87*b1cdbd2cSJim Jagielski.ENDIF
88*b1cdbd2cSJim Jagielski
89*b1cdbd2cSJim Jagielski.IF "$(GUIBASE)"=="aqua"
90*b1cdbd2cSJim Jagielski# native Mac OS X (Quartz)
91*b1cdbd2cSJim JagielskiSLOFILES+= $(SLO)$/cairo_quartz_cairo.obj
92*b1cdbd2cSJim JagielskiCFLAGSCXX+=$(OBJCXXFLAGS)
93*b1cdbd2cSJim Jagielski.ELSE    # "$(GUIBASE)"=="aqua"
94*b1cdbd2cSJim Jagielski
95*b1cdbd2cSJim Jagielski# Xlib
96*b1cdbd2cSJim JagielskiSLOFILES+= $(SLO)$/cairo_xlib_cairo.obj
97*b1cdbd2cSJim JagielskiSHL1STDLIBS+= -lfontconfig -lX11 -lXrender $(FREETYPE_LIBS)
98*b1cdbd2cSJim JagielskiCFLAGS+=$(FREETYPE_CFLAGS)
99*b1cdbd2cSJim Jagielski
100*b1cdbd2cSJim Jagielski.ENDIF   # "$(GUIBASE)"=="aqua"
101*b1cdbd2cSJim Jagielski
102*b1cdbd2cSJim Jagielski.ELSE    # "$(GUI)"=="UNX"
103*b1cdbd2cSJim Jagielski
104*b1cdbd2cSJim Jagielski.IF "$(GUI)"=="WNT"
105*b1cdbd2cSJim JagielskiSLOFILES+= $(SLO)$/cairo_win32_cairo.obj
106*b1cdbd2cSJim Jagielski.IF "$(COM)"=="GCC"
107*b1cdbd2cSJim JagielskiSHL1STDLIBS+= -lcairo
108*b1cdbd2cSJim Jagielski.ELSE
109*b1cdbd2cSJim JagielskiSHL1STDLIBS+= cairo.lib
110*b1cdbd2cSJim Jagielski.ENDIF
111*b1cdbd2cSJim JagielskiSHL1STDLIBS+= $(GDI32LIB) $(MSIMG32LIB)
112*b1cdbd2cSJim Jagielski.ENDIF
113*b1cdbd2cSJim Jagielski
114*b1cdbd2cSJim Jagielski.ENDIF   # "$(GUI)"=="UNX"
115*b1cdbd2cSJim Jagielski
116*b1cdbd2cSJim JagielskiSHL1IMPLIB=i$(TARGET)
117*b1cdbd2cSJim JagielskiSHL1LIBS=$(SLB)$/$(TARGET).lib
118*b1cdbd2cSJim JagielskiSHL1DEF=$(MISC)$/$(SHL1TARGET).def
119*b1cdbd2cSJim Jagielski
120*b1cdbd2cSJim JagielskiSHL1VERSIONMAP=$(SOLARENV)/src/component.map
121*b1cdbd2cSJim Jagielski
122*b1cdbd2cSJim JagielskiDEF1NAME=$(SHL1TARGET)
123*b1cdbd2cSJim JagielskiDEF1EXPORTFILE=exports.dxp
124*b1cdbd2cSJim Jagielski
125*b1cdbd2cSJim Jagielski.ENDIF
126*b1cdbd2cSJim Jagielski# ==========================================================================
127*b1cdbd2cSJim Jagielski
128*b1cdbd2cSJim Jagielski.INCLUDE :	target.mk
129*b1cdbd2cSJim Jagielski
130*b1cdbd2cSJim JagielskiALLTAR : $(MISC)/cairocanvas.component
131*b1cdbd2cSJim Jagielski
132*b1cdbd2cSJim Jagielski$(MISC)/cairocanvas.component .ERRREMOVE : \
133*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component
134*b1cdbd2cSJim Jagielski    $(XSLTPROC) --nonet --stringparam uri \
135*b1cdbd2cSJim Jagielski        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
136*b1cdbd2cSJim Jagielski        $(SOLARENV)/bin/createcomponent.xslt cairocanvas.component
137