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