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
|
# **********************************************************************
#
# Copyright (c) 2003-2017 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.
#
# **********************************************************************
include $(top_srcdir)/config/Make.xcodesdk.rules
supported-configs += xcodesdk cpp11-xcodesdk
is-iostest-program = $(and $(filter-out macosx,$2),$(filter program,$($1_target)))
#
# Xcode configuration to build Xcode IceSDK.
#
xcodesdk_targetdir = $(if $(filter %/build,$5),xcodesdk,$(if $(is-iostest-program),,IceSDK/$2.sdk/usr/lib))
xcodesdk_installdir = $(if $(filter %/build,$5),xcodesdk,$(if $(is-iostest-program),,IceSDK/$2.sdk/usr/lib))
xcodesdk_targetrule = $(if $(is-iostest-program),iostest,$(if $(filter-out program,$($1_target)),static))
xcodesdk_components = Ice IceSSL Glacier2 IceStorm IceGrid IceDiscovery IceLocatorDiscovery IceIAP TestCommon
xcodesdk_projects = test/Ice/% test/IceSSL/configuration
xcodesdk_excludes = $(addprefix test/Ice/,background \
faultTolerance \
gc \
logger \
properties \
stringConverter \
threadPoolPriority)
#
# Rule to build an iOS bundle for testing (this is used for packaging client/server programs)
#
define make-iostest-program
$2/$1.bundle/$1.dylib: $5 $(foreach d,$6,$($d_targets))
$(E) "Linking [$8-$9] $$@"
$(Q)if [ ! -f $2/$1.bundle/Info.plist ] ; \
then \
$(MKDIR) -p $2/$1.bundle ; \
sed "s/NAME/$1/" test/ios/bundles/BundleInfo.plist > $2/$1.bundle/Info.plist ; \
fi
$(Q)$(RM) $2/$1.bundle/$1.dylib
$(Q)$(or $($8_cxx),$(platform_cxx)) -bundle $(LDFLAGS) -o $2/$1.bundle/$1.dylib $5 $(strip $7)
endef
get-iostest-program-targets = $2/$1.bundle/$1.dylib
ifneq ($(findstring xcodesdk,$(configs)),)
$(eval $(call make-xcodesdk,bin/slice2cpp))
component_with_config_extensions := make-cpp-xcodesdk-component-with-config
endif
#
# $(call make-xcodesdk-component-with-config,$1=project,$2=component,$3=platform,$4=config,$5=comp[platform-config])
#
define make-cpp-xcodesdk-component-with-config
ifneq ($(filter src/%,$1),)
$(make-xcodesdk-component-with-config)
ifneq ($$(and $(filter iphone%,$3),$(filter Ice,$2),$$(filter-out $$($2_sdk_includedirs),$3-IceUtil)),)
$2_sdk_includedirs += $3-IceUtil
$$(eval $$(call install-data-files,$$(wildcard include/IceUtil/*.h),include,\
$(top_srcdir)/IceSDK/$3.sdk/usr/include,$5))
$$(eval $$(call install-data-files,$$(wildcard include/IceUtil/*.h),include,\
$(install_libdir)/IceSDK/$3.sdk/usr/include,$5_install))
endif
$5_clean::
$(Q)$(RM) -r $(top_srcdir)/IceSDK/$3.sdk/usr/include/$2
endif
endef
|