summaryrefslogtreecommitdiff
path: root/objective-c/config/Make.xcodesdk.rules
blob: 0d3ebe9ba52cfee568eea003e900561265dfb0bc (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
# **********************************************************************
#
# 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 arc-xcodesdk

#
# Xcode configuration to build Xcode sdks for Ice.
#
xcodesdk_targetdir      = $(if $(filter %/build,$5),xcodesdk,$(if $(filter all cpp obj%c,$(ICE_BIN_DIST)),,../)../sdk/$2.sdk/usr/lib)
xcodesdk_installdir     = $(if $(filter %/build,$5),xcodesdk,../sdk/$2.sdk/usr/lib)
xcodesdk_targetrule     = $(if $(filter-out program,$($1_target)),static)

xcodesdk_components     = Ice IceSSL IceIAP IceObjC IceSSLObjC IceIAPObjC Glacier2ObjC IceStormObjC IceGridObjC TestCommonObjC
xcodesdk_projects       = test/Ice/%

iphoneos_excludes        = test/%
iphonesimulator_excludes = test/%

ifneq ($(findstring xcodesdk,$(configs)),)
$(eval $(call make-xcodesdk,../cpp/bin/slice2objc))
component_with_config_extensions := make-objc-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-objc-xcodesdk-component-with-config
ifneq ($(filter src/%,$1),)

$(make-xcodesdk-component-with-config)

ifneq ($(filter-out $(sdk_includefiles),$3-$2),)
sdk_includefiles += $3-$2
$$(eval $$(call install-data-files,include/objc/$(subst ObjC,,$2).h,include,\
        $(top_srcdir)/sdk/$3.sdk/usr/include,$5))

$$(eval $$(call install-data-files,include/objc/$(subst ObjC,,$2).h,include,\
        $(install_sdkdir)/$3.sdk/usr/include,$5_install))

$5_clean::
	$(Q)$(RM) $(top_srcdir)/sdk/$3.sdk/usr/include/objc/$(subst ObjC,,$2).h
	$(Q)$(RM) -r $(top_srcdir)/sdk/$3.sdk/usr/include/objc/$(subst ObjC,,$2)
endif

endif
endef