xref: /aoo41x/main/canvas/source/directx/makefile.mk (revision cdf0e10c)
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=directx9canvas
32TARGET2=directx5canvas
33TARGET3=gdipluscanvas
34ENABLE_EXCEPTIONS=TRUE
35
36
37# --- Settings -----------------------------------------------------------
38
39.INCLUDE :	settings.mk
40DLLPRE =
41
42# --- Nothing to do if we're compiling with --disable-directx -----------
43.IF "$(ENABLE_DIRECTX)" == ""
44@all:
45	@echo "Building without DirectX support..."
46.ENDIF
47
48
49# --- Common ----------------------------------------------------------
50
51.IF "$(verbose)"!="" || "$(VERBOSE)"!=""
52CDEFS+= -DVERBOSE
53.ENDIF
54
55.IF "$(dx_debug_images)"!="" || "$(DX_DEBUG_IMAGES)"!=""
56CDEFS+= -DDX_DEBUG_IMAGES
57.ENDIF
58
59# --- This is Windows only! { ----------------------------------------------------------------
60
61.IF "$(GUI)" == "WNT"
62
63SHARED_SLOFILES = \
64	$(SLO)$/dx_bitmap.obj			        \
65	$(SLO)$/dx_bitmapcanvashelper.obj		\
66	$(SLO)$/dx_canvasbitmap.obj 			\
67	$(SLO)$/dx_canvasfont.obj 				\
68	$(SLO)$/dx_canvashelper.obj			    \
69	$(SLO)$/dx_canvashelper_texturefill.obj \
70	$(SLO)$/dx_devicehelper.obj				\
71	$(SLO)$/dx_gdiplususer.obj				\
72	$(SLO)$/dx_impltools.obj 				\
73	$(SLO)$/dx_linepolypolygon.obj			\
74	$(SLO)$/dx_textlayout.obj				\
75    $(SLO)$/dx_textlayout_drawhelper.obj    \
76	$(SLO)$/dx_vcltools.obj
77
78DX_SLOFILES = \
79	$(SLO)$/dx_5rm.obj					    \
80	$(SLO)$/dx_9rm.obj					    \
81	$(SLO)$/dx_canvascustomsprite.obj 		\
82	$(SLO)$/dx_config.obj					\
83	$(SLO)$/dx_spritecanvas.obj 			\
84	$(SLO)$/dx_spritecanvashelper.obj		\
85	$(SLO)$/dx_spritedevicehelper.obj		\
86	$(SLO)$/dx_spritehelper.obj 			\
87	$(SLO)$/dx_surfacebitmap.obj		    \
88	$(SLO)$/dx_surfacegraphics.obj
89DX_SLOFILES += $(SHARED_SLOFILES)
90
91GDIPLUS_SLOFILES = \
92	$(SLO)$/dx_canvas.obj
93GDIPLUS_SLOFILES += $(SHARED_SLOFILES)
94
95STDLIBS= $(CPPULIB) $(TKLIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(BASEGFXLIB) $(CANVASTOOLSLIB) $(VCLLIB) $(TOOLSLIB) $(UNOTOOLSLIB) $(I18NISOLANGLIB)
96
97
98########################################################
99# DX9
100########################################################
101
102# Indicates the source obj files for the dx5 lib
103LIB1TARGET= $(SLB)$/$(TARGET).lib
104LIB1OBJFILES = $(DX_SLOFILES)
105
106# Indicates the filename of the shared library.
107SHL1TARGET=$(TARGET).uno
108
109# Links import libraries.
110SHL1STDLIBS= $(STDLIBS)
111
112# Specifies an import library to create. For Win32 only.
113SHL1IMPLIB=i$(TARGET)
114
115# Specifies libraries from the same module to put into the shared library.
116SHL1LIBS=$(SLB)$/$(TARGET).lib
117
118SHL1DEF=$(MISC)$/$(SHL1TARGET).def
119
120DEF1NAME=$(SHL1TARGET)
121DEF1EXPORTFILE=exports.dxp
122
123CDEFS+=-DDIRECTX_VERSION=0x0900
124
125SHL1STDLIBS += $(GDI32LIB)
126.IF "$(COM)" == "GCC"
127SHL1STDLIBS += $(DIRECTXSDK_LIB)/d3d9.lib
128.ELSE
129SHL1STDLIBS += d3d9.lib
130.ENDIF
131SHL1STDLIBS += $(GDIPLUSLIB)
132
133.IF "$(dx_debug_images)"!="" || "$(DX_DEBUG_IMAGES)"!=""
134SHL1STDLIBS += imdebug.lib
135.ENDIF
136
137
138########################################################
139# DX5
140########################################################
141
142.IF "$(USE_DIRECTX5)" != ""
143SECOND_BUILD=DX5
144DX5_SLOFILES=$(DX_SLOFILES)
145DX5CDEFS += -DDIRECTX_VERSION=0x0500
146
147LIB2TARGET= $(SLB)$/$(TARGET2).lib
148LIB2OBJFILES = $(REAL_DX5_SLOFILES)
149
150# Indicates the filename of the shared library.
151SHL2TARGET=$(TARGET2).uno
152
153# Links import libraries.
154SHL2STDLIBS= $(STDLIBS)
155
156# Specifies an import library to create. For Win32 only.
157SHL2IMPLIB=i$(TARGET2).lib
158
159# Specifies libraries from the same module to put into the shared library.
160SHL2LIBS=$(SLB)$/$(TARGET2).lib
161SHL2DEF=$(MISC)$/$(SHL2TARGET).def
162
163DEF2NAME=$(SHL2TARGET)
164DEF2EXPORTFILE=exports.dxp
165
166SHL2STDLIBS += $(GDI32LIB)
167SHL2STDLIBS += $(DDRAWLIB)
168SHL2STDLIBS += $(GDIPLUSLIB)
169
170.IF "$(COM)" == "GCC"
171SHL2STDLIBS += $(DIRECTXSDK_LIB)/d3dx.lib
172.ELSE
173SHL2STDLIBS += d3dx.lib
174.ENDIF
175
176.IF "$(dx_debug_images)"!="" || "$(DX_DEBUG_IMAGES)"!=""
177SHL2STDLIBS += imdebug.lib
178.ENDIF
179.ENDIF # IF "$(USE_DIRECTX5)" != ""
180
181
182########################################################
183# GDI+
184########################################################
185
186LIB3TARGET= $(SLB)$/$(TARGET3).lib
187LIB3OBJFILES = $(GDIPLUS_SLOFILES)
188
189# Indicates the filename of the shared library.
190SHL3TARGET=$(TARGET3).uno
191
192# Links import libraries.
193SHL3STDLIBS= $(CPPULIB) $(TKLIB) $(SALLIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(BASEGFXLIB) $(CANVASTOOLSLIB) $(VCLLIB) $(TOOLSLIB) $(UNOTOOLSLIB) $(I18NISOLANGLIB)
194
195# Specifies an import library to create. For Win32 only.
196SHL3IMPLIB=i$(TARGET3).lib
197
198# Specifies libraries from the same module to put into the shared library.
199SHL3LIBS=$(SLB)$/$(TARGET3).lib
200SHL3DEF=$(MISC)$/$(SHL3TARGET).def
201
202DEF3NAME=$(SHL3TARGET)
203DEF3EXPORTFILE=exports.dxp
204
205SHL3STDLIBS += $(GDI32LIB)
206SHL3STDLIBS += $(GDIPLUSLIB)
207
208.IF "$(dx_debug_images)"!="" || "$(DX_DEBUG_IMAGES)"!=""
209SHL3STDLIBS += imdebug.lib
210.ENDIF
211
212.ENDIF # IF "$(GUI)" == "WNT"
213
214# --- This is Windows only! } ----------------------------------------------------------------
215
216# ==========================================================================
217
218.INCLUDE :	target.mk
219
220ALLTAR : \
221    $(MISC)/directx5canvas.component \
222    $(MISC)/directx9canvas.component \
223    $(MISC)/gdipluscanvas.component
224
225$(MISC)/directx5canvas.component .ERRREMOVE : \
226        $(SOLARENV)/bin/createcomponent.xslt directx5canvas.component
227    $(XSLTPROC) --nonet --stringparam uri \
228        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
229        $(SOLARENV)/bin/createcomponent.xslt directx5canvas.component
230
231$(MISC)/directx9canvas.component .ERRREMOVE : \
232        $(SOLARENV)/bin/createcomponent.xslt directx9canvas.component
233    $(XSLTPROC) --nonet --stringparam uri \
234        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
235        $(SOLARENV)/bin/createcomponent.xslt directx9canvas.component
236
237$(MISC)/gdipluscanvas.component .ERRREMOVE : \
238        $(SOLARENV)/bin/createcomponent.xslt gdipluscanvas.component
239    $(XSLTPROC) --nonet --stringparam uri \
240        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \
241        $(SOLARENV)/bin/createcomponent.xslt gdipluscanvas.component
242