xref: /AOO41X/main/cli_ure/source/ure/makefile.mk (revision 5979ef3c542ac870a02043decc543300c0ec3dfb)
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
28PRJ = ..$/..
29PRJNAME = cli_ure
30
31# for dummy
32TARGET = ure
33
34.INCLUDE : settings.mk
35.INCLUDE : $(PRJ)$/util$/makefile.pmk
36
37.INCLUDE : $(PRJ)$/util$/target.pmk
38.INCLUDE : target.mk
39
40.IF "$(BUILD_FOR_CLI)" != ""
41
42.INCLUDE : $(BIN)$/cliureversion.mk
43
44ASSEMBLY_ATTRIBUTES = $(MISC)$/assembly_ure_$(TARGET).cs
45
46POLICY_ASSEMBLY_FILE=$(BIN)$/$(CLI_URE_POLICY_ASSEMBLY).dll
47ALLTAR : \
48    $(BIN)$/cli_ure.dll \
49    $(POLICY_ASSEMBLY_FILE)
50
51.IF "$(CCNUMVER)" >= "001399999999"
52CSCFLAGS+=-keyfile:"$(BIN)$/cliuno.snk"
53.ENDIF
54
55CSFILES = \
56    uno$/util$/DisposeGuard.cs                  \
57    uno$/util$/WeakAdapter.cs                   \
58    uno$/util$/WeakBase.cs                      \
59    uno$/util$/WeakComponentBase.cs \
60    $(ASSEMBLY_ATTRIBUTES)
61
62.IF "$(CCNUMVER)" <= "001399999999"
63$(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk
64    $(GNUCOPY) -p assembly.cs $@
65    echo \
66    '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")] \
67    [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]' \
68    >> $@
69.ELSE
70$(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk
71    $(GNUCOPY) -p assembly.cs $@
72    echo \
73    '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")]' \
74    >> $@
75.ENDIF
76
77$(BIN)$/cli_ure.dll : $(CSFILES) $(BIN)$/cli_uretypes.dll $(BIN)$/cliureversion.mk
78    $(CSC) $(CSCFLAGS) \
79        -target:library \
80        -out:$@ \
81        -reference:$(OUT)$/bin$/cli_uretypes.dll \
82        -reference:System.dll \
83        $(CSFILES)
84    @echo "If code has changed then provide a policy assembly and change the version!"
85
86
87#do not forget to deliver cli_ure.config. It is NOT embedded in the policy file.
88$(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_ure.config
89    $(WRAPCMD) AL.exe -out:$@ \
90            -version:$(CLI_URE_POLICY_VERSION) \
91            -keyfile:$(BIN)$/cliuno.snk \
92            -link:$(BIN)$/cli_ure.config
93
94#Create the config file that is used with the policy assembly
95$(BIN)$/cli_ure.config: cli_ure_config $(BIN)$/cliureversion.mk
96    $(PERL) $(SOLARENV)$/bin$/clipatchconfig.pl \
97    $< $@
98
99
100.ENDIF
101
102
103