Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / cli_ure / source / native / makefile.mk
blob58e9bd359dfd7c2e7017528e1d3c5d0d2c580e61
1 #*************************************************************************
2 #
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 # ************************************************************************/
28 PRJ = ..$/..
29 PRJNAME = cli_ure
31 TARGET = cli_cppuhelper
32 ENABLE_EXCEPTIONS = TRUE
33 LIBTARGET = NO
34 USE_DEFFILE = TRUE
36 # disable caching to avoid stale objects
37 # on version changes
38 CCACHE_DISABLE=TRUE
39 .EXPORT : CCACHE_DISABLE
41 .INCLUDE : settings.mk
42 .INCLUDE : $(PRJ)$/util$/makefile.pmk
44 use_shl_versions=
46 .IF "$(BUILD_FOR_CLI)" == ""
47 #do not even build the cxx files because they contain cli cpp
48 all:
49 .ELSE
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 \
64 /delayload:sal3.dll
66 UWINAPILIB=
68 NO_OFFUH=TRUE
69 CPPUMAKERFLAGS =
70 UNOTYPES = \
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
83 SLOFILES = \
84 $(SLO)$/native_bootstrap.obj \
85 $(SLO)$/path.obj \
86 $(SLO)$/assembly_cppuhelper.obj
89 SHL1OBJS = $(SLOFILES)
91 SHL1TARGET = $(TARGET)
93 SHL1STDLIBS = \
94 $(CPPUHELPERLIB) \
95 $(CPPULIB) \
96 $(SALLIB) \
97 delayimp.lib \
98 advapi32.lib \
99 mscoree.lib \
100 Advapi32.lib
102 .IF "$(USE_DEBUG_RUNTIME)" == ""
103 SHL1STDLIBS += \
104 msvcmrt.lib
105 .ELSE
106 SHL1STDLIBS += \
107 msvcmrtd.lib
108 .ENDIF
110 SHL1VERSIONMAP = msvc.map
112 SHL1DEF = $(MISC)$/$(SHL1TARGET).def
113 DEF1NAME = $(SHL1TARGET)
116 .INCLUDE : $(PRJ)$/util$/target.pmk
117 .INCLUDE : target.mk
119 SIGN= $(MISC)$/cppuhelper_is_signed_flag
121 ALLTAR: \
122 $(POLICY_ASSEMBLY_FILE) \
123 $(SIGN)
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 $@
131 echo \
132 '[assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )];' \
133 >> $(OUT)$/misc$/assembly_cppuhelper.cxx
134 echo \
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 \
154 -platform:x86
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 \
159 $< $@
161 .ENDIF # "$(BUILD_FOR_CLI)" != ""