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
|
# **********************************************************************
#
# 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.
#
# **********************************************************************
# ----------------------------------------------------------------------
# Don't change anything below this line!
# ----------------------------------------------------------------------
-include $(lang_srcdir)/config/Make.rules.$(os)
#
# Supported configurations
#
supported-configs = shared static cpp11-shared cpp11-static
#
# Define which projects to build for the different configurations.
#
coreandstub_components = IceUtil \
Ice \
IceSSL \
IceDiscovery \
IceLocatorDiscovery \
Glacier2 \
IceStorm \
IceGrid \
IceBox \
IcePatch2
# Add the Bluetooth transport for Debian/Ubuntu
ifneq ($(filter debian ubuntu,$(linux_id)),)
coreandstub_components += IceXML IceBT
endif
#
# Build all the projects with the shared configuration
#
shared_projects = %
#
# Build only few components with the static configuration (core and stubs)
#
static_components = $(coreandstub_components)
static_projects = test/%
#
# Components and projects which are built with C++11
#
cpp11_components = $(coreandstub_components) icebox
cpp11_projects = test/Common \
test/IceUtil/% \
test/Slice/% \
test/Ice/% \
test/IceSSL/% \
test/IceDiscovery/% \
test/IceBox/%
cpp11_excludes = IcePatch2 \
test/Ice/optional \
test/Ice/gc \
test/Ice/custom \
test/Ice/echo
#
# If building on a Linux multilib platform, we restrict what we build for
# the 32-bits architecture. We basically, build the same set of components
# as C++11 (libraries and icebox executable).
#
ifeq ($(multilib-platform),yes)
x86_components = $(coreandstub_components) IceDB IceStormService icebox
x86_projects = test/%
endif
#
# C++11 configuration to build the C++11 mapping.
#
# Appends cpp11 to the configuration directory name. If we are building the
# target outside the component build directory, we also append the ++11
# suffix to the targetname. This is for example how icebox is compiled as
# icebox++11 when compiled with the C++11 configuration. We also don't add
# the cpp11 name to the target directory if building outside the build
# directory.
#
cpp11_cppflags = -DICE_CPP11_MAPPING -std=c++11
cpp11_targetname = $(if $(or $(filter-out $($1_target),program),$(filter-out %/build,$($1_targetdir))),++11)
cpp11_targetdir = $(if $(filter %/build,$($1_targetdir)),cpp11)
#
# Create top-level include/config dir
#
$(DESTDIR)$(install_includedir) $(DESTDIR)$(install_configdir):
$(Q)$(MKDIR) $@
#
# $(call make-cpp-src-project,$1=project)
#
define make-cpp-src-project
ifeq ($(USE_BIN_DIST),yes)
$(create-project-targets)
else
$1_slicecompiler := slice2cpp
$1_sliceflags += --ice -I$(slicedir)
$1_cppflags += -Isrc -I$(includedir) -I$(includedir)/generated -I$1/generated
$(make-project)
srcs:: $1
endif
endef
#
# $(call make-cpp-test-project,$1=project)
#
define make-cpp-test-project
$1_slicecompiler := slice2cpp
$1_sliceflags := -I$(slicedir) $$($1_sliceflags)
$1_cppflags := -I$(includedir) -Itest/include -I$1 -I$1/generated $$($1_cppflags)
ifneq ($(USE_BIN_DIST),yes)
$1_cppflags += -I$(includedir)/generated
endif
$(make-project)
tests:: $1
endef
#
# $(create-cpp-test-project $1=test)
#
define create-cpp-test-project
$1_srcext := cpp
$1_dependencies := $$(or $$($1_dependencies),TestCommon Ice IceUtil)
# Also link with IceSSL and IceBT (Debian/Ubuntu) when compiling with the static configuration
$1_dependencies[static] := $$(or $$($1_dependencies[static]),IceSSL $(if $(filter debian ubuntu,$(linux_id)),IceBT))
$(create-test-project)
endef
|