1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
10 # $Revision: 1.26.8.1 $
12 # This file is part of OpenOffice.org.
14 # OpenOffice.org is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU Lesser General Public License version 3
16 # only, as published by the Free Software Foundation.
18 # OpenOffice.org is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU Lesser General Public License version 3 for more details
22 # (a copy is included in the LICENSE file that accompanied this code).
24 # You should have received a copy of the GNU Lesser General Public License
25 # version 3 along with OpenOffice.org. If not, see
26 # <http://www.openoffice.org/license.html>
27 # for a copy of the LGPLv3 License.
29 # ************************************************************************/
35 TARGET
= cli_cppuhelper
37 ENABLE_EXCEPTIONS
= TRUE
41 # disable caching to avoid stale objects
44 .EXPORT
: CCACHE_DISABLE
46 .INCLUDE
: settings.mk
47 .INCLUDE
: $(PRJ
)$/util
$/makefile.pmk
51 .IF
"$(USE_SHELL)"!="4nt"
58 .IF "$(BUILD_FOR_CLI)" == ""
59 #do not even build the cxx files because they contain cli cpp
63 .INCLUDE : $(BIN)$/cliureversion.mk
65 ASSEMBLY_KEY="$(BIN)$/cliuno.snk"
67 ASSEMBLY_ATTRIBUTES = $(MISC)$/assembly_cppuhelper.cxx
69 POLICY_ASSEMBLY_FILE=$(BIN)$/$(CLI_CPPUHELPER_POLICY_ASSEMBLY).dll
71 ASSEMBLY_KEY_X=$(subst,\,\\ $(ASSEMBLY_KEY))
74 LINKFLAGS += /delayload:cppuhelper3MSC.dll \
75 /delayload:cppu3.dll \
83 com.sun.star.lang.XSingleComponentFactory \
84 com.sun.star.loader.CannotActivateFactoryException \
85 com.sun.star.container.XHierarchicalNameAccess \
86 com.sun.star.registry.CannotRegisterImplementationException \
87 com.sun.star.registry.XRegistryKey \
88 com.sun.star.registry.XSimpleRegistry
90 #loader lock was solved as of VS 2005 (CCNUMVER = 0014..)
91 # When compiling for CLR, disable "warning C4339: use of undefined type detected
92 # in CLR meta-data - use of this type may lead to a runtime exception":
93 .IF "$(CCNUMVER)" >= "001399999999"
94 CFLAGSCXX += -clr:oldSyntax -AI $(BIN) -wd4339
96 CFLAGSCXX += -clr -AI $(BIN) -wd4339
97 #see Microsoft Knowledge Base Article - 814472
98 LINKFLAGS += -NOENTRY -NODEFAULTLIB:nochkclr.obj -INCLUDE:__DllMainCRTStartup@12
102 $(SLO)$/native_bootstrap.obj \
104 $(SLO)$/assembly_cppuhelper.obj
107 SHL1OBJS = $(SLOFILES)
109 SHL1TARGET = $(TARGET)
120 .IF "$(CCNUMVER)" >= "001399999999"
125 SHL1VERSIONMAP = msvc.map
127 SHL1DEF = $(MISC)$/$(SHL1TARGET).def
128 DEF1NAME = $(SHL1TARGET)
131 .INCLUDE : $(PRJ)$/util$/target.pmk
134 SIGN= $(MISC)$/cppuhelper_is_signed_flag
137 $(POLICY_ASSEMBLY_FILE) \
142 .IF "$(CCNUMVER)" >= "001399999999"
143 CFLAGSCXX += -clr:oldSyntax
146 $(ASSEMBLY_ATTRIBUTES) : assembly.cxx $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk
147 @echo $(ASSEMBLY_KEY_X)
148 $(GNUCOPY) -p assembly.cxx $@
150 [assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )]; $(ECHOQUOTE) \
151 >> $(OUT)$/misc$/assembly_cppuhelper.cxx
153 [assembly:System::Reflection::AssemblyKeyFile($(ASSEMBLY_KEY_X))]; $(ECHOQUOTE) \
154 >> $(OUT)$/misc$/assembly_cppuhelper.cxx
158 #make sure we build cli_cppuhelper after the version changed
159 $(SHL1OBJS) : $(BIN)$/cli_cppuhelper.config
163 $(SIGN): $(SHL1TARGETN)
164 $(WRAPCMD) sn.exe -R $(BIN)$/$(TARGET).dll $(BIN)$/cliuno.snk && $(TOUCH) $@
166 #do not forget to deliver cli_cppuhelper.config. It is NOT embedded in the policy file.
167 .IF "$(CCNUMVER)" >= "001399999999"
169 # If the x86 switch is ommitted then the system assumes the assembly to be MSIL.
170 # The policy file is still found when an application tries to load an older
171 # cli_cppuhelper.dll but the system cannot locate it. It possibly assumes that the
172 # assembly is also 'MSIL
' like its policy file.
173 $(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_cppuhelper.config
174 $(WRAPCMD) $(AL) -out:$@ \
175 -version:$(CLI_CPPUHELPER_POLICY_VERSION) \
176 -keyfile:$(BIN)$/cliuno.snk \
177 -link:cli_cppuhelper.config,$(BIN)$/cli_cppuhelper.config \
180 #.NET 1.1: platform flag not needed
181 $(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_cppuhelper.config
182 $(WRAPCMD) $(AL) -out:$@ \
183 -version:$(CLI_CPPUHELPER_POLICY_VERSION) \
184 -keyfile:$(BIN)$/cliuno.snk \
185 -link:cli_cppuhelper.config,$(BIN)$/cli_cppuhelper.config
188 #Create the config file that is used with the policy assembly
189 $(BIN)$/cli_cppuhelper.config: cli_cppuhelper_config $(BIN)$/cliureversion.mk
190 $(PERL) $(SOLARENV)$/bin$/clipatchconfig.pl \
193 .ENDIF # "$(BUILD_FOR_CLI)" != ""