blob: 78605d763808e8f830a9013212fedbd0d477eaf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
|
# **********************************************************************
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************
#
# Select an installation base directory. The directory will be created
# if it does not exist.
#
!if "$(PREFIX)" == ""
prefix = C:\Ice-$(VERSION)
!else
prefix = $(PREFIX)
!endif
#
# Ice invokes unmanaged code to implement the following features:
#
# - Protocol compression
# - Signal processing in the Ice.Application class (Windows only)
#
# Enable MANAGED below if you do not require these features and prefer that
# the Ice run time use only managed code.
#
#MANAGED = yes
#
# Enable the UNITY flag to build for the Unity3D Web player. Enabling this
# setting also implies MANAGED. In addition to the features removed by
# MANAGED, this flag removes the following:
#
# - File I/O: property loading, file logger (Ice.LogFile), I/O redirection
# (Ice.StdOut, Ice.StdErr)
# - ICE_CONFIG environment variable
#
#UNITY = yes
#
# Define DEBUG as yes if you want to build with debug information and
# assertions enabled.
#
DEBUG = yes
#
# Define OPTIMIZE as yes if you want to build with optimization.
#
#OPTIMIZE = yes
#
# Define FRAMEWORK as 3.5 to force a .NET 3.5 build with Visual Studio 2010.
#
#FRAMEWORK = 3.5
#
# C++ Platform Win32|x64 used to locate slice2cs.exe
#
#CPP_PLATFORM = Win32
#
# C++ Configuration Debug|Release used to locate slice2cs.exe
#
#CPP_CONFIGURATION = Debug
#
# Set the key file used for strong name signing of assemblies.
#
!if "$(KEYFILE)" == ""
KEYFILE = $(top_srcdir)\..\config\IceDevKey.snk
!endif
#
# Define if you want the Ice assemblies to be authenticode signed.
#
#SIGN_CERTIFICATE = MyCertFile.pfx
#SIGN_PASSWORD = MyCertPassword
#SIGN_TIMESTAMPSERVER = http://timestamp.verisign.com/scripts/timstamp.dll
# ----------------------------------------------------------------------
# Don't change anything below this line!
# ----------------------------------------------------------------------
#
# Common definitions
#
ice_language = csharp
slice_translator = slice2cs.exe
!if exist ($(top_srcdir)\..\config\Make.common.rules.mak)
!include $(top_srcdir)\..\config\Make.common.rules.mak
!else
!include $(top_srcdir)\config\Make.common.rules.mak
!endif
bindir = $(top_srcdir)\bin
assembliesdir = $(top_srcdir)\Assemblies
install_bindir = $(prefix)\bin
install_assembliesdir = $(prefix)\Assemblies
install_configdir = $(prefix)\config
install_libdir = $(prefix)\lib
!if "$(CPP_PLATFORM)" == ""
CPP_PLATFORM = Win32
!endif
!if "$(CPP_PLATFORM)" != "Win32" && "$(CPP_PLATFORM)" != "x64"
!error Error: CPP_PLATFORM must be set to "Win32" or "x64", in order to locate slice2cs.exe
!endif
!if "$(CPP_CONFIGURATION)" == ""
CPP_CONFIGURATION = Debug
!endif
!if "$(CPP_CONFIGURATION)" != "Debug" && "$(CPP_CONFIGURATION)" != "Release"
!error Error: CPP_CONFIGURATION must be set to "Debug" or "Release", in order to locate slice2cs.exe
!endif
!if "$(ice_src_dist)" != ""
refdir = $(assembliesdir)
!else
refdir = $(ice_dir)\Assemblies
!endif
!if "$(PATCH_VERSION)" != "0" && "$(PATCH_VERSION)" != "51"
generate_policies = yes
!endif
MCS = csc -nologo
#
# UNITY implies MANAGED.
#
!if "$(UNITY)" == "yes"
MANAGED = yes
!endif
MCSFLAGS = -warnaserror
!if "$(DEBUG)" == "yes"
!if "$(OPTIMIZE)" == "yes"
MCSFLAGS = $(MCSFLAGS) -debug:pdbonly
!else
MCSFLAGS = $(MCSFLAGS) -debug
!endif
MCSFLAGS = $(MCSFLAGS) -define:DEBUG
!endif
!if "$(OPTIMIZE)" == "yes"
MCSFLAGS = $(MCSFLAGS) -optimize+
!endif
!if "$(MANAGED)" == "yes"
MCSFLAGS = $(MCSFLAGS) -define:MANAGED
!endif
!if "$(UNITY)" == "yes"
MCSFLAGS = $(MCSFLAGS) -define:UNITY
!endif
# Define for SupressMessage to work
#MCSFLAGS = $(MCSFLAGS) -define:CODE_ANALYSIS
!if "$(FRAMEWORK)" == "3.5"
MCSFLAGS = $(MCSFLAGS) /noconfig /nostdlib+ /define:DOTNET3_5
MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\mscorlib.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\System.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\System.Data.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(PROGRAMFILES)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(PROGRAMFILES)\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll"
!elseif "$(UNITY)" == "yes"
#
# You can compile against the WebPlayer assemblies by enabling the MCSFLAGS line below.
# You'll need to change UNITY_LIBDIR to the appropriate directory for your system.
#
UNITY_LIBDIR = C:\Program Files\Unity\Editor\Data\Mono\lib\mono\unity_web
UNITY_LIBS = "/r:$(UNITY_LIBDIR)\mscorlib.dll" \
"/r:$(UNITY_LIBDIR)\System.dll" \
"/r:$(UNITY_LIBDIR)\System.Core.dll"
MCSFLAGS = $(MCSFLAGS) -noconfig -nostdlib $(UNITY_LIBS)
!endif
!if "$(ice_src_dist)" != ""
!if "$(ice_cpp_dir)" == "$(ice_dir)\cpp"
SLICE2CS = $(ice_cpp_dir)\bin\$(CPP_PLATFORM)\$(CPP_CONFIGURATION)\slice2cs.exe
SLICEPARSERLIB = $(ice_cpp_dir)\lib\$(CPP_PLATFORM)\$(CPP_CONFIGURATION)\slice37.lib
!if !exist ("$(SLICEPARSERLIB)")
SLICEPARSERLIB = $(ice_cpp_dir)\lib\$(CPP_PLATFORM)\$(CPP_CONFIGURATION)\slice37d.lib
!endif
!else
SLICE2CS = $(ice_cpp_dir)\bin$(x64suffix)\slice2cs.exe
SLICEPARSERLIB = $(ice_cpp_dir)\lib$(x64suffix)\slice.lib
!if !exist ("$(SLICEPARSERLIB)")
SLICEPARSERLIB = $(ice_cpp_dir)\lib$(x64suffix)\sliced.lib
!endif
!endif
!else
SLICE2CS = $(ice_dir)\bin\slice2cs.exe
SLICEPARSERLIB = $(ice_dir)\lib\slice.lib
!endif
EVERYTHING = all clean install depend
EVERYTHING_EXCEPT_INSTALL = all clean depend
.SUFFIXES:
.SUFFIXES: .cs .ice
DEPEND_DIR = .depend.mak
!if "$(GEN_SRCS)" != ""
$(GEN_SRCS): "$(SLICE2CS)" "$(SLICEPARSERLIB)"
GEN_DEPENDS = $(GEN_SRCS:.cs=.d)
GEN_DEPENDS = $(GEN_DEPENDS:generated\=.depend.mak\)
DEPENDS = $(DEPENDS) $(GEN_DEPENDS)
!endif
!if "$(CGEN_SRCS)" != ""
$(CGEN_SRCS): "$(SLICE2CS)" "$(SLICEPARSERLIB)"
CGEN_DEPENDS = $(CGEN_SRCS:.cs=.d)
CGEN_DEPENDS = $(CGEN_DEPENDS:generated\=.depend.mak\)
DEPENDS = $(DEPENDS) $(CGEN_DEPENDS)
!endif
!if "$(SGEN_SRCS)" != ""
$(SGEN_SRCS): "$(SLICE2CS)" "$(SLICEPARSERLIB)"
SGEN_DEPENDS = $(SGEN_SRCS:.cs=.d)
SGEN_DEPENDS = $(SGEN_DEPENDS:generated\=.depend.mak\)
DEPENDS = $(DEPENDS) $(SGEN_DEPENDS)
!endif
!if "$(GEN_AMD_SRCS)" != ""
$(GEN_AMD_SRCS): "$(SLICE2CS)" "$(SLICEPARSERLIB)"
GEN_AMD_DEPENDS = $(GEN_AMD_SRCS:.cs=.d)
GEN_AMD_DEPENDS = $(GEN_AMD_DEPENDS:generated\=.depend.mak\)
DEPENDS = $(DEPENDS) $(GEN_AMD_DEPENDS)
!endif
!if "$(SAMD_GEN_SRCS)" != ""
$(SAMD_GEN_SRCS): "$(SLICE2CS)" "$(SLICEPARSERLIB)"
SAMD_GEN_DEPENDS = $(SAMD_GEN_SRCS:.cs=.d)
SAMD_GEN_DEPENDS = $(SAMD_GEN_DEPENDS:generated\=.depend.mak\)
DEPENDS = $(DEPENDS) $(SAMD_GEN_DEPENDS)
!endif
!if exist(.depend.mak)
!include .depend.mak
!endif
depend::
!if "$(DEPENDS)" != ""
depend::
@del /q .depend.mak
depend:: $(DEPENDS)
!endif
{$(SDIR)}.ice{$(DEPEND_DIR)}.d:
@echo Generating dependencies for $<
@"$(SLICE2CS)" --output-dir $(GDIR) $(SLICE2CSFLAGS) --depend $< |\
cscript /NoLogo $(top_srcdir)\..\config\makedepend-slice.vbs $(*F).ice
{$(SDIR)}.ice{$(GDIR)}.cs:
"$(SLICE2CS)" --output-dir $(GDIR) $(SLICE2CSFLAGS) $<
all:: $(TARGETS)
AL = al
POLICY = policy.$(SHORT_VERSION).$(PKG)
!if "$(generate_policies)" == "yes" && "$(POLICY_TARGET)" != ""
all:: $(assembliesdir)/$(POLICY_TARGET)
!endif
clean::
del /q $(TARGETS) *.pdb
!if "$(GEN_SRCS)" != ""
clean::
del /q $(GEN_SRCS)
!endif
!if "$(CGEN_SRCS)" != ""
clean::
del /q $(CGEN_SRCS)
!endif
!if "$(SGEN_SRCS)" != ""
clean::
del /q $(SGEN_SRCS)
!endif
!if "$(GEN_AMD_SRCS)" != ""
clean::
del /q $(GEN_AMD_SRCS)
!endif
!if "$(SAMD_GEN_SRCS)" != ""
clean::
del /q $(SAMD_GEN_SRCS)
!endif
!if "$(generate_policies)" == "yes" && "$(POLICY_TARGET)" != ""
$(assembliesdir)/$(POLICY_TARGET):
!if "$(PUBLIC_KEY_TOKEN)" == ""
!if "$(ice_src_dist)" != ""
@sn -q -p "$(KEYFILE)" tmp.pub && \
sn -q -t tmp.pub > tmp.publicKeyToken && \
set /P TMP_TOKEN= < tmp.publicKeyToken && \
cmd /c "set PUBLIC_KEY_TOKEN=%TMP_TOKEN:~-16% && \
del tmp.pub tmp.publicKeyToken && \
nmake /nologo /f Makefile.mak policy"
!else
@sn -q -T $(ice_dir)\Assemblies\Ice.dll > tmp.publicKeyToken && \
set /P TMP_TOKEN= < tmp.publicKeyToken && \
cmd /c "set PUBLIC_KEY_TOKEN=%TMP_TOKEN:~-16% && \
del tmp.publicKeyToken && \
nmake /nologo /f Makefile.mak policy"
!endif
!endif
publicKeyToken = $(PUBLIC_KEY_TOKEN: =)
policy:
@echo <<$(POLICY)
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="$(PKG)" publicKeyToken="$(publicKeyToken)" culture=""/>
<publisherPolicy apply="yes"/>
<bindingRedirect oldVersion="$(SHORT_VERSION).0.0 - $(SHORT_VERSION).1.0" newVersion="$(VERSION).0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<<KEEP
$(AL) /link:$(POLICY) /version:0.0.0.0 /out:$(POLICY_TARGET) /keyfile:"$(KEYFILE)"
move $(POLICY) $(assembliesdir)
move $(POLICY_TARGET) $(assembliesdir)
clean::
del /q $(assembliesdir)\$(POLICY) $(assembliesdir)\$(POLICY_TARGET)
!endif
install::
|