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 = basetypes
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
41POLICY_ASSEMBLY_FILE=$(BIN)$/$(CLI_BASETYPES_POLICY_ASSEMBLY).dll
42
43ALLTAR : \
44	$(BIN)$/cli_basetypes.dll \
45	$(POLICY_ASSEMBLY_FILE)
46
47.IF "$(CCNUMVER)" >= "001399999999"
48CSCFLAGS+=-keyfile:"$(BIN)$/cliuno.snk"
49.ENDIF
50
51CSFILES = \
52	uno$/Any.cs			\
53	uno$/BoundAttribute.cs \
54	uno$/ExceptionAttribute.cs	\
55	uno$/ParameterizedTypeAttribute.cs	\
56	uno$/TypeParametersAttribute.cs \
57	uno$/TypeArgumentsAttribute.cs \
58	uno$/OnewayAttribute.cs	\
59	uno$/PolymorphicType.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_BASETYPES_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_BASETYPES_NEW_VERSION)")]' \
74    >> $@
75.ENDIF
76
77$(BIN)$/cli_basetypes.dll : $(CSFILES) $(BIN)$/cliureversion.mk
78	$(CSC) $(CSCFLAGS) \
79		-target:library \
80		-out:$@ \
81		-reference:System.dll \
82		$(CSFILES)
83	@echo "If code has changed then provide a policy assembly and change the version!"
84
85#do not forget to deliver cli_uretypes.config. It is NOT embedded in the policy file.
86$(POLICY_ASSEMBLY_FILE) : $(BIN)$/cli_basetypes.config
87	$(WRAPCMD) AL.exe -out:$@ \
88			-version:$(CLI_BASETYPES_POLICY_VERSION) \
89			-keyfile:$(BIN)$/cliuno.snk \
90			-link:$(BIN)$/cli_basetypes.config
91
92
93#Create the config file that is used with the policy assembly
94$(BIN)$/cli_basetypes.config: cli_basetypes_config $(BIN)$/cliureversion.mk
95	$(PERL) $(SOLARENV)$/bin$/clipatchconfig.pl \
96	$< $@
97
98
99.ENDIF
100
101
102