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