File: Make.xcodesdk.rules

package info (click to toggle)
zeroc-ice 3.7.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,840 kB
  • sloc: cpp: 360,403; java: 226,078; cs: 102,261; javascript: 35,028; python: 28,875; objc: 27,050; php: 7,543; ruby: 7,190; yacc: 2,946; ansic: 2,490; xml: 1,599; lex: 1,241; makefile: 465; sh: 52
file content (74 lines) | stat: -rw-r--r-- 2,905 bytes parent folder | download | duplicates (3)
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
#
# Copyright (c) ZeroC, Inc. All rights reserved.
#

include $(top_srcdir)/config/Make.xcodesdk.rules

supported-configs       += xcodesdk cpp11-xcodesdk

is-iostest-program      = $(and $(filter-out macosx,$2),$(filter test/%,$1))

#
# Xcode configuration to build Xcode sdks for Ice.
#
xcodesdk_targetdir      = $(if $(filter %/build,$5),xcodesdk,$(if $(is-iostest-program),,$(if $(filter all cpp obj%c,$(ICE_BIN_DIST)),,../)../sdk/$2.sdk/usr/lib))
xcodesdk_installdir     = $(if $(filter %/build,$5),xcodesdk,$(if $(is-iostest-program),,../sdk/$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/Info.plist:
	$(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

$2/$1.bundle/$1.dylib: $5 $2/$1.bundle/Info.plist $(foreach d,$6,$($d_targets))
	$(E) "Linking [$8-$9] $$@"
	$(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 $2/$1.bundle/Info.plist

make-iostest-library = $(make-static-library)
get-iostest-library-targets = $(get-static-library-targets)

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 Ice,$2),$(filter-out $(sdk_includedirs),$3-IceUtil)),)
sdk_includedirs += $3-IceUtil
$$(eval $$(call install-data-files,$$(wildcard include/IceUtil/*.h),include,\
        $(top_srcdir)/sdk/$3.sdk/usr/include,$5))
$$(eval $$(call install-data-files,$$(wildcard include/IceUtil/*.h),include,\
        $(install_sdkdir)/$3.sdk/usr/include,$5_install))
endif

$5_clean::
	$(Q)$(RM) -r $(top_srcdir)/sdk/$3.sdk/usr/include/$2

endif
endef