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