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