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 28 29PRJ = ..$/.. 30PRJNAME = cli_ure 31 32TARGET = cli_cppuhelper 33NO_BSYMBOLIC = TRUE 34ENABLE_EXCEPTIONS = TRUE 35LIBTARGET = NO 36USE_DEFFILE = TRUE 37 38# disable caching to avoid stale objects 39# on version changes 40CCACHE_DISABLE=TRUE 41.EXPORT : CCACHE_DISABLE 42 43.INCLUDE : settings.mk 44.INCLUDE : $(PRJ)$/util$/makefile.pmk 45 46use_shl_versions= 47 48.IF "$(BUILD_FOR_CLI)" == "" 49#do not even build the cxx files because they contain cli cpp 50all: 51.ELSE 52 53.INCLUDE : $(BIN)$/cliureversion.mk 54 55ASSEMBLY_KEY="$(BIN)$/cliuno.snk" 56 57ASSEMBLY_ATTRIBUTES = $(MISC)$/assembly_cppuhelper.cxx 58 59POLICY_ASSEMBLY_FILE=$(BIN)$/$(CLI_CPPUHELPER_POLICY_ASSEMBLY).dll 60 61ASSEMBLY_KEY_X=$(subst,\,\\ $(ASSEMBLY_KEY)) 62 63 64LINKFLAGS += /delayload:cppuhelper3MSC.dll \ 65 /delayload:cppu3.dll \ 66 /delayload:sal3.dll 67 68UWINAPILIB= 69 70NO_OFFUH=TRUE 71CPPUMAKERFLAGS = 72UNOTYPES = \ 73 com.sun.star.lang.XSingleComponentFactory \ 74 com.sun.star.loader.CannotActivateFactoryException \ 75 com.sun.star.container.XHierarchicalNameAccess \ 76 com.sun.star.registry.CannotRegisterImplementationException \ 77 com.sun.star.registry.XRegistryKey \ 78 com.sun.star.registry.XSimpleRegistry 79 80#loader lock was solved as of VS 2005 (CCNUMVER = 0014..) 81# When compiling for CLR, disable "warning C4339: use of undefined type detected 82# in CLR meta-data - use of this type may lead to a runtime exception": 83.IF "$(CCNUMVER)" >= "001399999999" 84CFLAGSCXX += -clr:oldSyntax -AI $(BIN) -wd4339 85.ELSE 86CFLAGSCXX += -clr -AI $(BIN) -wd4339 87#see Microsoft Knowledge Base Article - 814472 88LINKFLAGS += -NOENTRY -NODEFAULTLIB:nochkclr.obj -INCLUDE:__DllMainCRTStartup@12 89.ENDIF 90 91SLOFILES = \ 92 $(SLO)$/native_bootstrap.obj \ 93 $(SLO)$/path.obj \ 94 $(SLO)$/assembly_cppuhelper.obj 95 96 97SHL1OBJS = $(SLOFILES) 98 99SHL1TARGET = $(TARGET) 100 101SHL1STDLIBS = \ 102 $(CPPUHELPERLIB) \ 103 $(CPPULIB) \ 104 $(SALLIB) \ 105 delayimp.lib \ 106 advapi32.lib \ 107 mscoree.lib \ 108 Advapi32.lib 109 110.IF "$(CCNUMVER)" >= "001399999999" 111SHL1STDLIBS += \ 112 msvcmrt.lib 113.ENDIF 114 115SHL1VERSIONMAP = msvc.map 116 117SHL1DEF = $(MISC)$/$(SHL1TARGET).def 118DEF1NAME = $(SHL1TARGET) 119 120 121.INCLUDE : $(PRJ)$/util$/target.pmk 122.INCLUDE : target.mk 123 124SIGN= $(MISC)$/cppuhelper_is_signed_flag 125 126ALLTAR: \ 127 $(POLICY_ASSEMBLY_FILE) \ 128 $(SIGN) 129 130 131 132.IF "$(CCNUMVER)" >= "001399999999" 133CFLAGSCXX += -clr:oldSyntax 134.ENDIF 135 136$(ASSEMBLY_ATTRIBUTES) : assembly.cxx $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk 137 @echo $(ASSEMBLY_KEY_X) 138 $(GNUCOPY) -p assembly.cxx $@ 139 echo \ 140 '[assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )];' \ 141 >> $(OUT)$/misc$/assembly_cppuhelper.cxx 142 echo \ 143 '[assembly:System::Reflection::AssemblyKeyFile($(ASSEMBLY_KEY_X))];' \ 144 >> $(OUT)$/misc$/assembly_cppuhelper.cxx 145 146 147 148#make sure we build cli_cppuhelper after the version changed 149$(SHL1OBJS) : $(BIN)$/cli_cppuhelper.config 150 151 152 153$(SIGN): $(SHL1TARGETN) 154 $(WRAPCMD) sn.exe -R $(BIN)$/$(TARGET).dll $(BIN)$/cliuno.snk && $(TOUCH) $@ 155 156#do not forget to deliver cli_cppuhelper.config. It is NOT embedded in the policy file. 157.IF "$(CCNUMVER)" >= "001399999999" 158#.NET 2 and higher 159# If the x86 switch is ommitted then the system assumes the assembly to be MSIL. 160# The policy file is still found when an application tries to load an older 161# cli_cppuhelper.dll but the system cannot locate it. It possibly assumes that the 162# assembly is also 'MSIL' like its policy file. 163$(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_cppuhelper.config 164 $(WRAPCMD) AL.exe -out:$@ \ 165 -version:$(CLI_CPPUHELPER_POLICY_VERSION) \ 166 -keyfile:$(BIN)$/cliuno.snk \ 167 -link:$(BIN)$/cli_cppuhelper.config \ 168 -platform:x86 169.ELSE 170#.NET 1.1: platform flag not needed 171$(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_cppuhelper.config 172 $(WRAPCMD) AL.exe -out:$@ \ 173 -version:$(CLI_CPPUHELPER_POLICY_VERSION) \ 174 -keyfile:$(BIN)$/cliuno.snk \ 175 -link:$(BIN)$/cli_cppuhelper.config 176.ENDIF 177 178#Create the config file that is used with the policy assembly 179$(BIN)$/cli_cppuhelper.config: cli_cppuhelper_config $(BIN)$/cliureversion.mk 180 $(PERL) $(SOLARENV)$/bin$/clipatchconfig.pl \ 181 $< $@ 182 183.ENDIF # "$(BUILD_FOR_CLI)" != "" 184 185