xref: /AOO42X/main/cli_ure/source/ure/makefile.mk (revision 5e48fca7e524eb943907f0a8808aae8b4c4c7424)
1*7871dc3eSAndrew Rist#**************************************************************
2cdf0e10cSrcweir#
3*7871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4*7871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5*7871dc3eSAndrew Rist#  distributed with this work for additional information
6*7871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7*7871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
8*7871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
9*7871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir#
11*7871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir#
13*7871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
14*7871dc3eSAndrew Rist#  software distributed under the License is distributed on an
15*7871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
17*7871dc3eSAndrew Rist#  specific language governing permissions and limitations
18*7871dc3eSAndrew Rist#  under the License.
19cdf0e10cSrcweir#
20*7871dc3eSAndrew Rist#**************************************************************
21*7871dc3eSAndrew Rist
22*7871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ = ..$/..
25cdf0e10cSrcweirPRJNAME = cli_ure
26cdf0e10cSrcweir
27cdf0e10cSrcweir# for dummy
28cdf0e10cSrcweirTARGET = ure
29cdf0e10cSrcweir
30cdf0e10cSrcweir.INCLUDE : settings.mk
31cdf0e10cSrcweir.INCLUDE : $(PRJ)$/util$/makefile.pmk
32cdf0e10cSrcweir
33cdf0e10cSrcweir.INCLUDE : $(PRJ)$/util$/target.pmk
34cdf0e10cSrcweir.INCLUDE : target.mk
35cdf0e10cSrcweir
36cdf0e10cSrcweir.IF "$(BUILD_FOR_CLI)" != ""
37cdf0e10cSrcweir
38cdf0e10cSrcweir.INCLUDE : $(BIN)$/cliureversion.mk
39cdf0e10cSrcweir
40cdf0e10cSrcweirASSEMBLY_ATTRIBUTES = $(MISC)$/assembly_ure_$(TARGET).cs
41cdf0e10cSrcweir
42cdf0e10cSrcweirPOLICY_ASSEMBLY_FILE=$(BIN)$/$(CLI_URE_POLICY_ASSEMBLY).dll
43cdf0e10cSrcweirALLTAR : \
44cdf0e10cSrcweir    $(BIN)$/cli_ure.dll \
45cdf0e10cSrcweir    $(POLICY_ASSEMBLY_FILE)
46cdf0e10cSrcweir
47cdf0e10cSrcweir.IF "$(CCNUMVER)" >= "001399999999"
48cdf0e10cSrcweirCSCFLAGS+=-keyfile:"$(BIN)$/cliuno.snk"
49cdf0e10cSrcweir.ENDIF
50cdf0e10cSrcweir
51cdf0e10cSrcweirCSFILES = \
52cdf0e10cSrcweir    uno$/util$/DisposeGuard.cs                  \
53cdf0e10cSrcweir    uno$/util$/WeakAdapter.cs                   \
54cdf0e10cSrcweir    uno$/util$/WeakBase.cs                      \
55cdf0e10cSrcweir    uno$/util$/WeakComponentBase.cs \
56cdf0e10cSrcweir    $(ASSEMBLY_ATTRIBUTES)
57cdf0e10cSrcweir
58cdf0e10cSrcweir.IF "$(CCNUMVER)" <= "001399999999"
59cdf0e10cSrcweir$(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk
60cdf0e10cSrcweir    $(GNUCOPY) -p assembly.cs $@
61cdf0e10cSrcweir    echo \
62cdf0e10cSrcweir    '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")] \
63cdf0e10cSrcweir    [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]' \
64cdf0e10cSrcweir    >> $@
65cdf0e10cSrcweir.ELSE
66cdf0e10cSrcweir$(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk
67cdf0e10cSrcweir    $(GNUCOPY) -p assembly.cs $@
68cdf0e10cSrcweir    echo \
69cdf0e10cSrcweir    '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")]' \
70cdf0e10cSrcweir    >> $@
71cdf0e10cSrcweir.ENDIF
72cdf0e10cSrcweir
73cdf0e10cSrcweir$(BIN)$/cli_ure.dll : $(CSFILES) $(BIN)$/cli_uretypes.dll $(BIN)$/cliureversion.mk
74cdf0e10cSrcweir    $(CSC) $(CSCFLAGS) \
75cdf0e10cSrcweir        -target:library \
76cdf0e10cSrcweir        -out:$@ \
77cdf0e10cSrcweir        -reference:$(OUT)$/bin$/cli_uretypes.dll \
78cdf0e10cSrcweir        -reference:System.dll \
79cdf0e10cSrcweir        $(CSFILES)
80cdf0e10cSrcweir    @echo "If code has changed then provide a policy assembly and change the version!"
81cdf0e10cSrcweir
82cdf0e10cSrcweir
83cdf0e10cSrcweir#do not forget to deliver cli_ure.config. It is NOT embedded in the policy file.
84cdf0e10cSrcweir$(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_ure.config
85cdf0e10cSrcweir    $(WRAPCMD) AL.exe -out:$@ \
86cdf0e10cSrcweir            -version:$(CLI_URE_POLICY_VERSION) \
87cdf0e10cSrcweir            -keyfile:$(BIN)$/cliuno.snk \
88cdf0e10cSrcweir            -link:$(BIN)$/cli_ure.config
89cdf0e10cSrcweir
90cdf0e10cSrcweir#Create the config file that is used with the policy assembly
91cdf0e10cSrcweir$(BIN)$/cli_ure.config: cli_ure_config $(BIN)$/cliureversion.mk
92cdf0e10cSrcweir    $(PERL) $(SOLARENV)$/bin$/clipatchconfig.pl \
93cdf0e10cSrcweir    $< $@
94cdf0e10cSrcweir
95cdf0e10cSrcweir
96cdf0e10cSrcweir.ENDIF
97