1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 # ************************************************************************/
31 TARGET
= cli_cppuhelper
32 ENABLE_EXCEPTIONS
= TRUE
36 # disable caching to avoid stale objects
39 .EXPORT
: CCACHE_DISABLE
41 .INCLUDE
: settings.mk
42 .INCLUDE
: $(PRJ
)$/util
$/makefile.pmk
46 .IF
"$(BUILD_FOR_CLI)" == ""
47 #do not even build the cxx files because they contain cli cpp
51 .INCLUDE
: $(BIN
)$/cliureversion.mk
53 ASSEMBLY_KEY
="$(BIN)$/cliuno.snk"
55 ASSEMBLY_ATTRIBUTES
= $(MISC
)$/assembly_cppuhelper.
cxx
57 POLICY_ASSEMBLY_FILE
=$(BIN
)$/$(CLI_CPPUHELPER_POLICY_ASSEMBLY
).dll
59 ASSEMBLY_KEY_X
=$(subst,\
,\\ $(ASSEMBLY_KEY
))
62 LINKFLAGS
+= /delayload
:cppuhelper3MSC.dll \
63 /delayload
:cppu3.dll \
71 com.sun.star.lang.XSingleComponentFactory \
72 com.sun.star.loader.CannotActivateFactoryException \
73 com.sun.star.container.XHierarchicalNameAccess \
74 com.sun.star.registry.CannotRegisterImplementationException \
75 com.sun.star.registry.XRegistryKey \
76 com.sun.star.registry.XSimpleRegistry
78 #loader lock was solved as of VS 2005 (CCNUMVER = 0014..)
79 # When compiling for CLR, disable "warning C4339: use of undefined type detected
80 # in CLR meta-data - use of this type may lead to a runtime exception":
81 CFLAGSCXX
+= -clr
:oldSyntax
-AI
$(BIN
) -wd4339
84 $(SLO
)$/native_bootstrap.obj \
86 $(SLO
)$/assembly_cppuhelper.obj
89 SHL1OBJS
= $(SLOFILES
)
91 SHL1TARGET
= $(TARGET
)
102 .IF
"$(USE_DEBUG_RUNTIME)" == ""
110 SHL1VERSIONMAP
= msvc.map
112 SHL1DEF
= $(MISC
)$/$(SHL1TARGET
).def
113 DEF1NAME
= $(SHL1TARGET
)
116 .INCLUDE
: $(PRJ
)$/util
$/target.pmk
119 SIGN
= $(MISC
)$/cppuhelper_is_signed_flag
122 $(POLICY_ASSEMBLY_FILE
) \
126 CFLAGSCXX
+= -clr
:oldSyntax
128 $(ASSEMBLY_ATTRIBUTES
) : assembly.
cxx $(BIN
)$/cliuno.snk
$(BIN
)$/cliureversion.mk
129 @echo
$(ASSEMBLY_KEY_X
)
130 $(GNUCOPY
) -p assembly.
cxx $@
132 '[assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )];' \
133 >> $(OUT
)$/misc
$/assembly_cppuhelper.
cxx
135 '[assembly:System::Reflection::AssemblyKeyFile($(ASSEMBLY_KEY_X))];' \
136 >> $(OUT
)$/misc
$/assembly_cppuhelper.
cxx
138 #make sure we build cli_cppuhelper after the version changed
139 $(SHL1OBJS
) : $(BIN
)$/cli_cppuhelper.config
141 $(SIGN
): $(SHL1TARGETN
)
142 $(WRAPCMD
) sn.exe
-R
$(BIN
)$/$(TARGET
).dll
$(BIN
)$/cliuno.snk
&& $(TOUCH
) $@
144 #do not forget to deliver cli_cppuhelper.config. It is NOT embedded in the policy file.
145 # If the x86 switch is ommitted then the system assumes the assembly to be MSIL.
146 # The policy file is still found when an application tries to load an older
147 # cli_cppuhelper.dll but the system cannot locate it. It possibly assumes that the
148 # assembly is also 'MSIL' like its policy file.
149 $(POLICY_ASSEMBLY_FILE
) : $(BIN
)$/cli_cppuhelper.config
150 $(WRAPCMD
) AL.exe
-out
:$@ \
151 -version
:$(CLI_CPPUHELPER_POLICY_VERSION
) \
152 -keyfile
:$(BIN
)$/cliuno.snk \
153 -link
:$(BIN
)$/cli_cppuhelper.config \
156 #Create the config file that is used with the policy assembly
157 $(BIN
)$/cli_cppuhelper.config
: cli_cppuhelper_config
$(BIN
)$/cliureversion.mk
158 $(PERL
) $(SOLARENV
)$/bin
$/clipatchconfig.pl \
161 .ENDIF
# "$(BUILD_FOR_CLI)" != ""