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