]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## |
46f4442e | 2 | # Wrapper makefile for ICU |
0f5d89e8 | 3 | # Copyright (C) 2003-2018 Apple Inc. All rights reserved. |
b75a7d8f A |
4 | # |
5 | # See http://www.gnu.org/manual/make/html_chapter/make_toc.html#SEC_Contents | |
6 | # for documentation on makefiles. Most of this was culled from the ncurses makefile. | |
7 | # | |
51004dcb | 8 | ################################# |
2ca993e8 A |
9 | # Apple ICU repository tag and submission numbers |
10 | # | |
11 | # The repository tag number consists of a main version and an optional branch version, as | |
12 | # follows: | |
13 | # ICU-MMmAA[.B] | |
14 | # | |
15 | # MM comes from the open-source ICU major version, and can range from 1 to 214 (the max is | |
f3c0d7a5 | 16 | # due to B&I limits on submission versions). As of March 2016 this is 57; it increases |
2ca993e8 A |
17 | # by 1 for each ICU major release (usually 2 / year). This corresponds to |
18 | # U_ICU_VERSION_MAJOR_NUM. | |
19 | # m is a single digit specifying the open-source ICU minor version. This is 0 before final | |
20 | # release (e.g. for pre-release milestones), becomes 1 for release candidate and final | |
21 | # release, and may increase to 2 or a little more for occasional dot releases with | |
22 | # maintenance fixes. This corresponds to U_ICU_VERSION_MINOR_NUM. | |
23 | # | |
24 | # Note that the ICU release may also utilize U_ICU_VERSION_PATCHLEVEL_NUM; however | |
25 | # that is ignored for the Apple ICU tag and submission numbers, and any related code | |
26 | # or data changes will bne distinguished by updating the Apple delta version AA below. | |
27 | # | |
28 | # AA is a 2-digit value specifying the version of the additional Apple deltas after | |
29 | # integrating a major release. This is always 2 digits (zero padded) and ranges from | |
30 | # 00 (the first release after integrating a new ICU version) to 99. | |
31 | # B is an optional branch version, i.e. a branch from the mainline version specified by | |
32 | # the MMmAA part. It can range from 1 to 99 and is NOT zero-padded. | |
33 | # | |
34 | # For Windows builds, the first 3 values of the 4-part FILEVERSION and PRODUCTVERSION | |
35 | # are formed from U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, and | |
36 | # U_ICU_VERSION_PATCHLEVEL_NUM; the 4th value is ICU_BUILD, formed from AA and B as | |
37 | # ICU_BUILD = 100*AA + B. | |
38 | # | |
39 | # The B&I submission version always has 3 parts separated by '.': | |
40 | # MMmAA.(0 | B).T | |
41 | # | |
42 | # The first part MMmAA is the same as the repository tag number. | |
43 | # If the repository tag has no branch version, the second part is 0, otherwise it is | |
44 | # the same as the branch version (1..99). | |
45 | # The third part is a single digit designating the submission train; since the installsrc | |
46 | # target now submits different sources to different trains, we have to distinguish them. | |
47 | # The values currently defined for T are | |
48 | # 1 OSX trains | |
f3c0d7a5 | 49 | # 2 embedded trains (iOS, tvos, watchos, bridgeos) including simulator versions thereof |
2ca993e8 A |
50 | # 8 AAS for Windows |
51 | # 9 linux for Siri servers | |
52 | # (additional train numbers for Apple platforms can be assigned from 3 up, additional | |
53 | # train numbers for non-Apple platforms can be assigned from 7 down). | |
54 | # | |
55 | ################################# | |
f3c0d7a5 | 56 | # Notes on building for AAS using Windows (10) + Visual Studio (2015) + Cygwin: |
51004dcb A |
57 | # |
58 | # Either this should be run indirectly from the VS command prompt via the | |
59 | # BuildICUForAAS script or project, using the instructions there (which build | |
60 | # both 32-bit and 64-bit), or it should be run from within Cygwin using the | |
4f1e1a09 A |
61 | # following instructions or equivalent (different steps for 32-bit or 64-bit |
62 | # targets, details may also differ if you have the 32-bit cygwin install vs the | |
63 | # 64-bit one, i.e. cygwin vs cygwin64): | |
51004dcb A |
64 | # |
65 | # 1. From VS command prompt, run vcvarsall.bat to set various environment variables. | |
66 | # For a 32-bit build: | |
f3c0d7a5 | 67 | # > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 |
51004dcb | 68 | # For a 64-bit build: |
f3c0d7a5 | 69 | # > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 |
51004dcb | 70 | # |
4f1e1a09 | 71 | # 2. Launch Cygwin, e.g. for the 64-bit cygwin install: |
f3c0d7a5 | 72 | # > C:\cygwin64\cygwin.bat |
51004dcb A |
73 | # |
74 | # 3. Within cygwin, cd to the top level of the ICU sources directory, e.g. | |
75 | # $ cd ICU | |
76 | # | |
77 | # 4. Adjust the PATH to put the appropriate VC tools directory first: | |
78 | # For a 32-bit build: | |
f3c0d7a5 | 79 | # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/":$PATH |
51004dcb | 80 | # For a 64-bit build: |
f3c0d7a5 | 81 | # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/":$PATH |
51004dcb A |
82 | # |
83 | # 5. Run the ICU makefile | |
84 | # For a 32-bit build: | |
85 | # make [install] WINDOWS=YES [ARCH64=NO] [DSTROOT=...] | |
86 | # For a 64-bit build: | |
87 | # make [install] WINDOWS=YES ARCH64=YES [DSTROOT=...] | |
88 | # | |
89 | ################################# | |
b75a7d8f A |
90 | |
91 | ################################# | |
92 | ################################# | |
93 | # MAKE VARS | |
94 | ################################# | |
95 | ################################# | |
96 | ||
97 | # ':=' denotes a "simply expanded" variable. It's value is | |
98 | # set at the time of definition and it never recursively expands | |
99 | # when used. This is in contrast to using '=' which denotes a | |
100 | # recursively expanded variable. | |
101 | ||
2ca993e8 A |
102 | # Sane defaults, which are typically overridden on the command line |
103 | #or by the environment | |
0f5d89e8 A |
104 | ifeq ($(OS),Windows_NT) |
105 | WINDOWS=YES | |
106 | LINUX=NO | |
107 | else | |
108 | WINDOWS=NO | |
109 | LINUX?=$(shell [[ "`uname -s`" == "Linux" ]] && echo YES || echo NO) | |
110 | endif | |
111 | ARCH64?=YES | |
2ca993e8 A |
112 | RC_ARCHS= |
113 | ifndef RC_ProjectSourceVersion | |
114 | ifdef RC_PROJECTSOURCEVERSION | |
115 | RC_ProjectSourceVersion=$(RC_PROJECTSOURCEVERSION) | |
116 | endif | |
117 | endif | |
4f1e1a09 | 118 | $(info # RC_XBS=$(RC_XBS)) |
2ca993e8 A |
119 | $(info # RC_ARCHS=$(RC_ARCHS)) |
120 | $(info # RC_ProjectName=$(RC_ProjectName)) | |
121 | $(info # RC_ProjectSourceVersion=$(RC_ProjectSourceVersion)) | |
122 | ||
123 | # Disallow $(WINDOWS) and $(LINUX) both YES | |
124 | ifeq "$(WINDOWS)" "YES" | |
125 | ifeq "$(LINUX)" "YES" | |
126 | $(error WINDOWS and LINUX cannot both be YES) | |
127 | endif | |
128 | endif | |
729e4ab9 | 129 | |
51004dcb | 130 | # chicken and egg problem: we can't use cygpath until PATH & SHELL are set, |
f3c0d7a5 | 131 | # but we have to convert VS140VCTOOLS_PATH in order to set PATH. So instead we |
51004dcb A |
132 | # convert using subst. |
133 | ifeq "$(WINDOWS)" "YES" | |
f3c0d7a5 A |
134 | ifneq "$(VS140VCTOOLS_PATH)" "" |
135 | VS140VCTOOLS_CYGPATH:= /cygdrive/$(subst :/,/,$(subst \,/,$(VS140VCTOOLS_PATH))) | |
136 | PATH:=$(VS140VCTOOLS_CYGPATH):/usr/local/bin/:/usr/bin/:$(PATH) | |
51004dcb A |
137 | endif |
138 | endif | |
139 | $(info # PATH=$(PATH)) | |
140 | ||
141 | # For some reason, cygwin bash (at least when run non-login) needs to use | |
142 | # bash for pwd, echo etc. (but uname does not work, see below) | |
143 | ifeq "$(WINDOWS)" "YES" | |
144 | SHELL := /bin/bash | |
145 | else | |
146 | SHELL := /bin/sh | |
147 | endif | |
148 | ||
149 | # if building for windows from batch script, convert Win-style paths | |
150 | # for SRCROOT etc. to cygwin-style paths. Don't define them if not | |
151 | # already defined. | |
152 | ifeq "$(WINDOWS)" "YES" | |
f3c0d7a5 | 153 | ifneq "$(VS140VCTOOLS_PATH)" "" |
51004dcb A |
154 | ifdef SRCROOT |
155 | SRCROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SRCROOT))) | |
156 | endif | |
157 | ifdef OBJROOT | |
158 | OBJROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(OBJROOT))) | |
159 | endif | |
160 | ifdef DSTROOT | |
161 | DSTROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(DSTROOT))) | |
162 | endif | |
163 | ifdef SYMROOT | |
164 | SYMROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SYMROOT))) | |
165 | endif | |
166 | endif | |
167 | endif | |
168 | ||
169 | ifndef SRCROOT | |
170 | SRCROOT:=$(shell pwd) | |
171 | endif | |
172 | ifndef OBJROOT | |
173 | OBJROOT:=$(SRCROOT)/build | |
174 | endif | |
175 | ifndef DSTROOT | |
176 | DSTROOT:=$(OBJROOT) | |
177 | endif | |
178 | ifndef SYMROOT | |
179 | SYMROOT:=$(OBJROOT) | |
180 | endif | |
2ca993e8 A |
181 | $(info # SRCROOT=$(SRCROOT)) |
182 | $(info # OBJROOT=$(OBJROOT)) | |
183 | $(info # DSTROOT=$(DSTROOT)) | |
184 | ||
185 | # Disallow $(SRCROOT) == $(OBJROOT) | |
186 | ifeq ($(OBJROOT), $(SRCROOT)) | |
187 | $(error SRCROOT same as OBJROOT) | |
188 | endif | |
51004dcb A |
189 | |
190 | ifeq "$(WINDOWS)" "YES" | |
191 | ifeq "$(ARCH64)" "YES" | |
192 | OBJROOT_CURRENT=$(OBJROOT)/obj64 | |
193 | SYMROOT_CURRENT=$(SYMROOT)/obj64 | |
194 | else | |
195 | OBJROOT_CURRENT=$(OBJROOT)/obj32 | |
196 | SYMROOT_CURRENT=$(SYMROOT)/obj32 | |
197 | endif | |
198 | else ifeq "$(LINUX)" "YES" | |
199 | ifeq "$(ARCH64)" "YES" | |
200 | OBJROOT_CURRENT=$(OBJROOT)/obj64 | |
201 | SYMROOT_CURRENT=$(SYMROOT)/obj64 | |
202 | else | |
203 | OBJROOT_CURRENT=$(OBJROOT)/obj32 | |
204 | SYMROOT_CURRENT=$(SYMROOT)/obj32 | |
205 | endif | |
206 | else | |
207 | OBJROOT_CURRENT=$(OBJROOT) | |
208 | SYMROOT_CURRENT=$(SYMROOT) | |
209 | endif | |
2ca993e8 A |
210 | |
211 | ifndef SDKROOT | |
212 | SDKPATH:=/ | |
213 | else ifeq "$(SDKROOT)" "" | |
214 | SDKPATH:=/ | |
215 | else | |
216 | SDKPATH:=$(shell xcodebuild -version -sdk $(SDKROOT) Path) | |
217 | ifeq "$(SDKPATH)" "" | |
218 | SDKPATH:=/ | |
219 | endif | |
220 | endif | |
221 | $(info # SDKROOT=$(SDKROOT)) | |
222 | $(info # SDKPATH=$(SDKPATH)) | |
223 | ||
224 | # An Apple submission version (passed in RC_ProjectSourceVersion for official builds) is | |
225 | # X[.Y[.Z]] | |
226 | # where X is in range 0-214747, Y and Z are in range 0-99 (with no leading zeros). | |
227 | # This corresponds to MMmAA.(0 | B).T where | |
228 | # MM is U_ICU_VERSION_MAJOR_NUM | |
229 | # m is U_ICU_VERSION_MINOR_NUM | |
9f1b1155 | 230 | # AA is the Apple delta version |
2ca993e8 A |
231 | # B is the Apple branch version (1 or 2 digits) |
232 | # T is the Apple train code for submissions. | |
233 | # Note The value for the SourceVersion property in version.plists will be calculated as | |
234 | # (X*10000 + Y*100 + Z). | |
235 | # We want ICU_BUILD = 100*AA + B. | |
9f1b1155 | 236 | # |
2ca993e8 A |
237 | ifneq "$(RC_ProjectSourceVersion)" "" |
238 | ifeq "$(WINDOWS)" "YES" | |
4f1e1a09 A |
239 | ICU_BUILD_AA := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\2/') |
240 | ICU_BUILD_B1 := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\4/') | |
241 | ICU_BUILD_B2 := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\5/') | |
242 | ICU_TRAIN_CODE := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\7/') | |
2ca993e8 A |
243 | else |
244 | ICU_BUILD_AA := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\2/') | |
245 | ICU_BUILD_B1 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\4/') | |
246 | ICU_BUILD_B2 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\5/') | |
247 | ICU_TRAIN_CODE := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\7/') | |
248 | endif | |
249 | ifeq "$(ICU_BUILD_AA)" "" | |
250 | ICU_BUILD := 0 | |
251 | else | |
252 | ICU_BUILD := $(subst a,$(ICU_BUILD_AA),abc) | |
253 | ifeq "$(ICU_BUILD_B1)" "" | |
254 | ICU_BUILD := $(subst b,0,$(ICU_BUILD)) | |
255 | ICU_BUILD := $(subst c,0,$(ICU_BUILD)) | |
256 | else | |
257 | ifeq "$(ICU_BUILD_B2)" "" | |
258 | ICU_BUILD := $(subst b,0,$(ICU_BUILD)) | |
259 | ICU_BUILD := $(subst c,$(ICU_BUILD_B1),$(ICU_BUILD)) | |
260 | else | |
261 | ICU_BUILD := $(subst b,$(ICU_BUILD_B1),$(ICU_BUILD)) | |
262 | ICU_BUILD := $(subst c,$(ICU_BUILD_B2),$(ICU_BUILD)) | |
263 | endif | |
264 | endif | |
265 | endif | |
266 | ifeq "$(ICU_TRAIN_CODE)" "" | |
267 | ICU_TRAIN_CODE := 0 | |
268 | endif | |
269 | else | |
270 | ICU_BUILD := 0 | |
271 | ICU_TRAIN_CODE := 0 | |
272 | endif | |
273 | $(info # ICU_BUILD=$(ICU_BUILD)) | |
274 | $(info # ICU_TRAIN_CODE=$(ICU_TRAIN_CODE)) | |
275 | ifeq "$(ICU_BUILD)" "0" | |
276 | DEFINE_BUILD_LEVEL = | |
277 | else | |
278 | DEFINE_BUILD_LEVEL =-DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) | |
279 | endif | |
280 | ||
281 | # Determine build type. In some cases (e.g. running installsrc for submitproject) | |
282 | # the only accurate information we may have about build type is from ICU_TRAIN_CODE, | |
283 | # so give priority to that if nonzero. | |
284 | # The values currently defined for ICU_TRAIN_CODE and corresponding ICU_BUILD_TYPE are | |
285 | # 1 OSX trains | |
286 | # 2 embedded trains (iOS, tvos, watchos) including simulator versions thereof. | |
287 | # may have BUILD_TYPE=DEVICE,SIMULATOR,TOOL | |
288 | # 8 AAS for Windows | |
289 | # 9 linux for Siri servers | |
290 | # | |
291 | ifeq "$(WINDOWS)" "YES" | |
292 | ICU_FOR_APPLE_PLATFORMS:=NO | |
293 | else ifeq "$(ICU_TRAIN_CODE)" "8" | |
294 | override WINDOWS=YES | |
295 | ICU_FOR_APPLE_PLATFORMS:=NO | |
296 | else ifeq "$(LINUX)" "YES" | |
297 | ICU_FOR_APPLE_PLATFORMS:=NO | |
298 | else ifeq "$(ICU_TRAIN_CODE)" "9" | |
299 | override LINUX=YES | |
300 | ICU_FOR_APPLE_PLATFORMS:=NO | |
301 | else | |
302 | ICU_FOR_APPLE_PLATFORMS:=YES | |
303 | endif | |
304 | ||
305 | # For Apple builds, get more details from the SDK if available | |
306 | # In TargetConditionals.h: | |
307 | # TARGET_OS_IPHONE -is 1 iff generating code for firmware, devices, or simulator (all embedded trains) | |
308 | # in that case: | |
309 | # exactly one of the following is 1: TARGET_OS_SIMULATOR, TARGET_OS_EMBEDDED (i.e. device) | |
f3c0d7a5 | 310 | # exactly one of the following is 1: TARGET_OS_IOS, TARGET_OS_TV, TARGET_OS_WATCH, TARGET_OS_BRIDGE |
2ca993e8 A |
311 | # |
312 | ifeq "$(ICU_FOR_APPLE_PLATFORMS)" "YES" | |
313 | HOSTCC := $(shell xcrun --sdk macosx --find cc) | |
314 | HOSTCXX := $(shell xcrun --sdk macosx --find c++) | |
0f5d89e8 | 315 | HOSTSDKPATH := $(shell xcrun --sdk macosx.internal --show-sdk-path) |
2ca993e8 A |
316 | HOSTISYSROOT = -isysroot $(HOSTSDKPATH) |
317 | ifeq "$(SDKPATH)" "/" | |
318 | ISYSROOT:= -isysroot $(HOSTSDKPATH) | |
319 | CC := $(HOSTCC) | |
320 | CXX := $(HOSTCXX) | |
321 | NM := $(shell xcrun --sdk macosx --find nm) | |
322 | STRIPCMD := $(shell xcrun --sdk macosx --find strip) | |
323 | ifeq "$(ICU_TRAIN_CODE)" "2" | |
324 | export ICU_FOR_EMBEDDED_TRAINS:=YES | |
325 | else | |
326 | export ICU_FOR_EMBEDDED_TRAINS:=NO | |
327 | endif | |
328 | else | |
329 | ISYSROOT:= -isysroot $(SDKPATH) | |
330 | CC := $(shell xcrun --sdk $(SDKPATH) --find cc) | |
331 | CXX := $(shell xcrun --sdk $(SDKPATH) --find c++) | |
332 | NM := $(shell xcrun --sdk $(SDKPATH) --find nm) | |
333 | STRIPCMD := $(shell xcrun --sdk $(SDKPATH) --find strip) | |
334 | EMBEDDEDTRAIN:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_IPHONE | cut -d' ' -f3) | |
335 | ifeq "$(EMBEDDEDTRAIN)" "1" | |
336 | export ICU_FOR_EMBEDDED_TRAINS:=YES | |
337 | else | |
338 | export ICU_FOR_EMBEDDED_TRAINS:=NO | |
339 | endif | |
340 | endif | |
341 | SIMULATOROS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_SIMULATOR | cut -d' ' -f3) | |
342 | TVOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_TV | cut -d' ' -f3) | |
343 | WATCHOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_WATCH | cut -d' ' -f3) | |
f3c0d7a5 | 344 | BRIDGEOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_BRIDGE | cut -d' ' -f3) |
2ca993e8 A |
345 | ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" |
346 | ifeq "$(SIMULATOROS)" "1" | |
347 | BUILD_TYPE=SIMULATOR | |
348 | else | |
349 | BUILD_TYPE=DEVICE | |
350 | endif | |
351 | else ifeq "$(RC_ProjectName)" "tzTools" | |
352 | BUILD_TYPE=TOOL | |
353 | else | |
354 | BUILD_TYPE= | |
355 | endif | |
356 | else | |
357 | ifeq "$(LINUX)" "YES" | |
358 | ISYSROOT:= | |
0f5d89e8 A |
359 | ifeq "$(shell (which clang >& /dev/null && which clang++ >& /dev/null && echo YES) || echo NO)" "YES" |
360 | CC := clang | |
361 | CXX := clang++ | |
362 | else | |
363 | CC := gcc | |
364 | CXX := g++ | |
365 | endif | |
2ca993e8 A |
366 | endif |
367 | export ICU_FOR_EMBEDDED_TRAINS:=NO | |
368 | TVOS:=0 | |
369 | WATCHOS:=0 | |
f3c0d7a5 | 370 | BRIDGEOS:=0 |
2ca993e8 A |
371 | BUILD_TYPE= |
372 | endif | |
373 | ||
374 | CROSS_BUILD:=$(ICU_FOR_EMBEDDED_TRAINS) | |
729e4ab9 | 375 | CROSSHOST_OBJROOT=$(OBJROOT)/crossbuildhost |
2ca993e8 A |
376 | |
377 | $(info # ICU_FOR_APPLE_PLATFORMS=$(ICU_FOR_APPLE_PLATFORMS)) | |
378 | $(info # HOSTCC=$(HOSTCC)) | |
379 | $(info # HOSTCXX=$(HOSTCXX)) | |
380 | $(info # HOSTISYSROOT=$(HOSTISYSROOT)) | |
381 | $(info # CC=$(CC)) | |
382 | $(info # CXX=$(CXX)) | |
383 | $(info # ISYSROOT=$(ISYSROOT)) | |
384 | $(info # ICU_FOR_EMBEDDED_TRAINS=$(ICU_FOR_EMBEDDED_TRAINS)) | |
385 | $(info # CROSS_BUILD=$(CROSS_BUILD)) | |
386 | $(info # BUILD_TYPE=$(BUILD_TYPE)) | |
387 | ||
388 | # Disallow cross builds on Windows/Linux for now | |
389 | # (since those builds are not out-of-source as required for cross-builds) | |
390 | ifeq "$(CROSS_BUILD)" "YES" | |
391 | ifeq "$(WINDOWS)" "YES" | |
392 | $(error Cross-builds currently not allowed on Windows) | |
393 | endif | |
394 | ifeq "$(LINUX)" "YES" | |
395 | $(error Cross-builds currently not allowed on Linux) | |
396 | endif | |
397 | endif | |
398 | ||
0f5d89e8 A |
399 | MAC_OS_X_VERSION_MIN_REQUIRED=101300 |
400 | OSX_HOST_VERSION_MIN_STRING=10.13 | |
2ca993e8 | 401 | |
b331163b | 402 | ifndef IPHONEOS_DEPLOYMENT_TARGET |
0f5d89e8 | 403 | IOS_VERSION_TARGET_STRING=12.0 |
b331163b | 404 | else ifeq "$(IPHONEOS_DEPLOYMENT_TARGET)" "" |
0f5d89e8 | 405 | IOS_VERSION_TARGET_STRING=12.0 |
b331163b A |
406 | else |
407 | IOS_VERSION_TARGET_STRING=$(IPHONEOS_DEPLOYMENT_TARGET) | |
408 | endif | |
2ca993e8 | 409 | |
b331163b | 410 | ifndef MACOSX_DEPLOYMENT_TARGET |
0f5d89e8 | 411 | OSX_VERSION_TARGET_STRING=10.14 |
b331163b | 412 | else ifeq "$(MACOSX_DEPLOYMENT_TARGET)" "" |
0f5d89e8 | 413 | OSX_VERSION_TARGET_STRING=10.14 |
b331163b A |
414 | else |
415 | OSX_VERSION_TARGET_STRING=$(MACOSX_DEPLOYMENT_TARGET) | |
416 | endif | |
2ca993e8 | 417 | |
b331163b | 418 | ifndef WATCHOS_DEPLOYMENT_TARGET |
0f5d89e8 | 419 | WATCHOS_VERSION_TARGET_STRING=5.0 |
b331163b | 420 | else ifeq "$(WATCHOS_DEPLOYMENT_TARGET)" "" |
0f5d89e8 | 421 | WATCHOS_VERSION_TARGET_STRING=5.0 |
b331163b A |
422 | else |
423 | WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_DEPLOYMENT_TARGET) | |
424 | endif | |
2ca993e8 | 425 | |
b331163b | 426 | ifndef TVOS_DEPLOYMENT_TARGET |
0f5d89e8 | 427 | TVOS_VERSION_TARGET_STRING=12.0 |
b331163b | 428 | else ifeq "$(TVOS_DEPLOYMENT_TARGET)" "" |
0f5d89e8 | 429 | TVOS_VERSION_TARGET_STRING=12.0 |
b331163b A |
430 | else |
431 | TVOS_VERSION_TARGET_STRING=$(TVOS_DEPLOYMENT_TARGET) | |
432 | endif | |
729e4ab9 | 433 | |
f3c0d7a5 A |
434 | ifndef BRIDGEOS_DEPLOYMENT_TARGET |
435 | BRIDGEOS_VERSION_TARGET_STRING=2.0 | |
436 | else ifeq "$(BRIDGEOS_DEPLOYMENT_TARGET)" "" | |
437 | BRIDGEOS_VERSION_TARGET_STRING=2.0 | |
438 | else | |
439 | BRIDGEOS_VERSION_TARGET_STRING=$(BRIDGEOS_DEPLOYMENT_TARGET) | |
440 | endif | |
441 | ||
b331163b A |
442 | $(info # IOS_VERSION_TARGET_STRING=$(IOS_VERSION_TARGET_STRING)) |
443 | $(info # OSX_VERSION_TARGET_STRING=$(OSX_VERSION_TARGET_STRING)) | |
444 | $(info # WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_VERSION_TARGET_STRING)) | |
445 | $(info # TVOS_VERSION_TARGET_STRING=$(TVOS_VERSION_TARGET_STRING)) | |
f3c0d7a5 | 446 | $(info # BRIDGEOS_VERSION_TARGET_STRING=$(BRIDGEOS_VERSION_TARGET_STRING)) |
51004dcb | 447 | |
2ca993e8 A |
448 | ifeq "$(BUILD_TYPE)" "DEVICE" |
449 | ifeq "$(WATCHOS)" "1" | |
450 | ICU_TARGET_VERSION := -mwatchos-version-min=$(WATCHOS_VERSION_TARGET_STRING) | |
451 | else ifeq "$(TVOS)" "1" | |
452 | ICU_TARGET_VERSION := -mtvos-version-min=$(TVOS_VERSION_TARGET_STRING) | |
f3c0d7a5 A |
453 | else ifeq "$(BRIDGEOS)" "1" |
454 | ICU_TARGET_VERSION := -mbridgeos-version-min=$(BRIDGEOS_VERSION_TARGET_STRING) | |
2ca993e8 A |
455 | else |
456 | ICU_TARGET_VERSION := -miphoneos-version-min=$(IOS_VERSION_TARGET_STRING) | |
457 | endif | |
458 | else ifeq "$(BUILD_TYPE)" "SIMULATOR" | |
459 | ifeq "$(WATCHOS)" "1" | |
460 | ICU_TARGET_VERSION := -mwatchos-simulator-version-min=$(WATCHOS_VERSION_TARGET_STRING) | |
461 | else ifeq "$(TVOS)" "1" | |
462 | ICU_TARGET_VERSION := -mtvos-simulator-version-min=$(TVOS_VERSION_TARGET_STRING) | |
463 | else | |
464 | ICU_TARGET_VERSION := -mios-simulator-version-min=$(IOS_VERSION_TARGET_STRING) | |
465 | endif | |
466 | else | |
467 | ICU_TARGET_VERSION := | |
468 | endif | |
469 | $(info # ICU_TARGET_VERSION=$(ICU_TARGET_VERSION)) | |
470 | ||
471 | ||
472 | DISABLE_DRAFT:=$(ICU_FOR_EMBEDDED_TRAINS) | |
473 | ifeq "$(DISABLE_DRAFT)" "YES" | |
474 | DRAFT_FLAG=--disable-draft | |
475 | else | |
476 | DRAFT_FLAG= | |
477 | endif | |
478 | ||
51004dcb A |
479 | # For some reason, under cygwin, bash uname is not found, and |
480 | # sh uname does not produce a result with -p or -m. So we just | |
481 | # hardcode here. | |
482 | ifeq "$(WINDOWS)" "YES" | |
483 | UNAME_PROCESSOR:=i386 | |
484 | else | |
485 | UNAME_PROCESSOR:=$(shell uname -p) | |
486 | endif | |
57a6839d | 487 | |
729e4ab9 | 488 | ifneq "$(RC_ARCHS)" "" |
729e4ab9 | 489 | INSTALLHDRS_ARCH=-arch $(shell echo $(RC_ARCHS) | cut -d' ' -f1) |
73c04bcf | 490 | else |
729e4ab9 | 491 | INSTALLHDRS_ARCH= |
73c04bcf | 492 | endif |
729e4ab9 A |
493 | $(info # INSTALLHDRS_ARCH=$(INSTALLHDRS_ARCH)) |
494 | $(info # buildhost=$(UNAME_PROCESSOR)) | |
57a6839d | 495 | |
729e4ab9 A |
496 | |
497 | # FORCEENDIAN below is to override silly configure behavior in which if | |
498 | # __APPLE_CC__ is defined and archs are in { ppc, ppc64, i386, x86_64 } | |
499 | # then it assumes a universal build (ac_cv_c_bigendian=universal) with | |
500 | # data file initially built big-endian. | |
501 | # | |
502 | ifeq "$(CROSS_BUILD)" "YES" | |
503 | RC_ARCHS_FIRST=$(shell echo $(RC_ARCHS) | cut -d' ' -f1) | |
0f5d89e8 | 504 | TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin17.3.0 |
51004dcb | 505 | ENV_CONFIGURE_ARCHS=-arch $(RC_ARCHS_FIRST) |
729e4ab9 A |
506 | ICUPKGTOOLIBS="$(CROSSHOST_OBJROOT)/lib:$(CROSSHOST_OBJROOT)/stubdata" |
507 | ICUPKGTOOL=$(CROSSHOST_OBJROOT)/bin/icupkg | |
508 | ifeq "$(filter-out i386 x86_64,$(RC_ARCHS))" "" | |
509 | FORCEENDIAN= ac_cv_c_bigendian=no | |
510 | else | |
511 | FORCEENDIAN= | |
512 | endif | |
513 | else ifeq "$(LINUX)" "YES" | |
514 | TARGET_SPEC=$(UNAME_PROCESSOR)-unknown-linux-gnu | |
515 | ENV_CONFIGURE_ARCHS= | |
51004dcb A |
516 | ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata" |
517 | ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg | |
729e4ab9 | 518 | FORCEENDIAN= |
46f4442e | 519 | else |
0f5d89e8 | 520 | TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin17.3.0 |
729e4ab9 | 521 | ENV_CONFIGURE_ARCHS= |
51004dcb A |
522 | ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata" |
523 | ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg | |
729e4ab9 | 524 | FORCEENDIAN= |
46f4442e | 525 | endif |
729e4ab9 A |
526 | $(info # TARGET_SPEC=$(TARGET_SPEC)) |
527 | $(info # ENV_CONFIGURE_ARCHS=$(ENV_CONFIGURE_ARCHS)) | |
46f4442e | 528 | |
57a6839d A |
529 | ICU_TARGET_VERSION_FOR_TZ_EXTRA := |
530 | ifeq "$(BUILD_TYPE)" "SIMULATOR" | |
531 | ICU_TARGET_VERSION_FOR_TZ_EXTRA := -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) | |
46f4442e A |
532 | endif |
533 | ||
57a6839d | 534 | ifeq "$(BUILD_TYPE)" "DEVICE" |
729e4ab9 | 535 | THUMB_FLAG = -mthumb |
57a6839d A |
536 | else |
537 | THUMB_FLAG = | |
729e4ab9 A |
538 | endif |
539 | ||
5ea0322b A |
540 | # even for a crossbuild host build, we want to use the target's latest tzdata as pointed to by latest_tzdata.tar.gz; |
541 | # first try RC_EMBEDDEDPROJECT_DIR (<rdar://problem/28141177>), else SDKPATH. | |
542 | ifdef RC_EMBEDDEDPROJECT_DIR | |
543 | ifeq "$(shell test -L $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/latest_tzdata.tar.gz && echo YES )" "YES" | |
544 | export TZDATA:=$(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/$(shell readlink $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/latest_tzdata.tar.gz) | |
545 | endif | |
f3c0d7a5 A |
546 | ifeq "$(shell test -d $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/icudata && echo YES )" "YES" |
547 | export TZAUXFILESDIR:=$(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/icudata | |
548 | endif | |
5ea0322b A |
549 | endif |
550 | ifndef TZDATA | |
551 | ifeq "$(shell test -L $(SDKPATH)/usr/local/share/tz/latest_tzdata.tar.gz && echo YES )" "YES" | |
552 | export TZDATA:=$(SDKPATH)/usr/local/share/tz/$(shell readlink $(SDKPATH)/usr/local/share/tz/latest_tzdata.tar.gz) | |
553 | endif | |
f3c0d7a5 A |
554 | ifeq "$(shell test -d $(SDKPATH)/usr/local/share/tz/icudata && echo YES )" "YES" |
555 | export TZAUXFILESDIR:=$(SDKPATH)/usr/local/share/tz/icudata | |
556 | endif | |
08b89b0a | 557 | endif |
5ea0322b | 558 | $(info # RC_EMBEDDEDPROJECT_DIR=$(RC_EMBEDDEDPROJECT_DIR)) |
729e4ab9 | 559 | $(info # TZDATA=$(TZDATA)) |
f3c0d7a5 A |
560 | $(info # TZAUXFILESDIR=$(TZAUXFILESDIR)) |
561 | ifndef TZAUXFILESDIR | |
562 | TZAUXFILESDIR:=. | |
563 | endif | |
729e4ab9 | 564 | |
2ca993e8 | 565 | APPLE_INTERNAL_DIR=/AppleInternal |
51004dcb A |
566 | DSYMTOOL := /usr/bin/dsymutil |
567 | DSYMSUFFIX := .dSYM | |
568 | ||
b75a7d8f A |
569 | ################################# |
570 | # Headers | |
571 | ################################# | |
572 | ||
573 | # For installhdrs. Not every compiled module has an associated header. Normally, | |
2ca993e8 | 574 | # ICU installs headers as a sub-target of the install target. But since we only want |
b75a7d8f A |
575 | # certain libraries to install (and since we link all of our own .o modules), we need |
576 | # invoke the headers targets ourselves. This may be problematic because there isn't a | |
577 | # good way to dist-clean afterwards...we need to do explicit dist-cleans, especially if | |
578 | # install the extra libraries. | |
579 | ||
580 | EXTRA_HDRS = | |
2ca993e8 A |
581 | # EXTRA_HDRS = ./extra/ustdio/ ./layout/ |
582 | ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" | |
73c04bcf A |
583 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) |
584 | else ifeq "$(WINDOWS)" "YES" | |
585 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) | |
586 | else | |
587 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ ./io/ $(EXTRA_HDRS) | |
588 | endif | |
589 | ifeq "$(WINDOWS)" "YES" | |
73c04bcf | 590 | PRIVATE_HDR_PREFIX=$(APPLE_INTERNAL_DIR) |
2ca993e8 | 591 | else ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" |
73c04bcf A |
592 | HDR_PREFIX=/usr |
593 | PRIVATE_HDR_PREFIX=/usr/local | |
729e4ab9 A |
594 | else |
595 | PRIVATE_HDR_PREFIX=/usr/local | |
73c04bcf | 596 | endif |
b75a7d8f A |
597 | |
598 | ################################# | |
599 | # Install | |
600 | ################################# | |
601 | ||
2ca993e8 A |
602 | # For install. We currently don't install EXTRA_LIBS. We also don't install the data |
603 | # directly into the ICU library. It is now installed at /usr/share/icu/*.dat. Thus we | |
b75a7d8f A |
604 | # don't use DATA_OBJ anymore. This could change if we decide to move the data back into |
605 | # the icucore monolithic library. | |
606 | ||
607 | INSTALL = /usr/bin/install | |
608 | COMMON_OBJ = ./common/*.o | |
609 | I18N_OBJ = ./i18n/*.o | |
73c04bcf | 610 | IO_OBJ = ./io/*.o |
b75a7d8f A |
611 | STUB_DATA_OBJ = ./stubdata/*.o |
612 | EXTRA_LIBS = | |
613 | #EXTRA_LIBS =./extra/ ./layout/ ./tools/ctestfw/ ./tools/toolutil/ | |
614 | #DATA_OBJ = ./data/out/build/*.o | |
2ca993e8 | 615 | ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" |
73c04bcf A |
616 | DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(STUB_DATA_OBJ) |
617 | else ifeq "$(WINDOWS)" "YES" | |
618 | DYLIB_OBJS=$(COMMON_OBJ) ./common/common.res $(I18N_OBJ) $(STUB_DATA_OBJ) | |
619 | else | |
620 | DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(IO_OBJ) $(STUB_DATA_OBJ) | |
621 | endif | |
b75a7d8f | 622 | |
46f4442e A |
623 | ################################# |
624 | # Sources | |
625 | ################################# | |
626 | ||
627 | # For installsrc (B&I) | |
628 | # Note that installsrc is run on the system from which ICU is submitted, which | |
629 | # may be a different environment than the one for a which a build is targeted. | |
630 | ||
b331163b A |
631 | INSTALLSRC_VARFILES=./ICU_embedded.order \ |
632 | ./minimalapis.txt ./minimalapisTest.c ./minimalpatchconfig.txt ./windowspatchconfig.txt ./patchconfig.txt ./crosshostpatchconfig.txt \ | |
633 | BuildICUForAAS_script.bat EXPORT.APPLE | |
46f4442e | 634 | |
b75a7d8f A |
635 | ################################# |
636 | # Cleaning | |
637 | ################################# | |
638 | ||
639 | #We need to clean after installing. | |
640 | ||
2ca993e8 | 641 | EXTRA_CLEAN = |
b75a7d8f A |
642 | |
643 | # Some directories aren't cleaned recursively. Clean them manually... | |
644 | MANUAL_CLEAN_TOOLS = ./tools/dumpce | |
645 | MANUAL_CLEAN_EXTRA = ./extra/scrptrun ./samples/layout ./extra/ustdio ./extra | |
2ca993e8 | 646 | MANUAL_CLEAN_TEST = ./test/collperf ./test/iotest ./test/letest ./test/thaitest ./test/threadtest ./test/testmap ./test |
b75a7d8f A |
647 | MANUAL_CLEAN_SAMPLE = ./samples/layout ./samples |
648 | ||
2ca993e8 | 649 | CLEAN_SUBDIR = ./stubdata ./common ./i18n ./io ./layout ./layoutex ./data ./tools ./$(MANUAL_CLEAN_TOOLS) $(MANUAL_CLEAN_EXTRA) $(MANUAL_CLEAN_TEST) $(MANUAL_CLEAN_SAMPLE) |
b75a7d8f A |
650 | |
651 | ################################# | |
652 | # Config flags | |
653 | ################################# | |
654 | ||
729e4ab9 | 655 | ifeq "$(WINDOWS)" "YES" |
51004dcb A |
656 | ifeq "$(ARCH64)" "YES" |
657 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \ | |
658 | --with-data-packaging=library --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=64 \ | |
659 | $(DRAFT_FLAG) | |
660 | else | |
661 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \ | |
662 | --with-data-packaging=library --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \ | |
663 | $(DRAFT_FLAG) | |
664 | endif | |
729e4ab9 A |
665 | else ifeq "$(LINUX)" "YES" |
666 | ifeq "$(ARCH64)" "YES" | |
667 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
668 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=64 \ | |
669 | $(DRAFT_FLAG) | |
670 | else | |
671 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
672 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \ | |
673 | $(DRAFT_FLAG) | |
674 | endif | |
2ca993e8 A |
675 | else ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" |
676 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
729e4ab9 | 677 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \ |
4388f060 | 678 | $(DRAFT_FLAG) |
73c04bcf | 679 | else |
729e4ab9 A |
680 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ |
681 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \ | |
4388f060 | 682 | $(DRAFT_FLAG) |
73c04bcf | 683 | endif |
b75a7d8f A |
684 | |
685 | ################################# | |
686 | # Install paths | |
687 | ################################# | |
688 | ||
2ca993e8 A |
689 | # This may or may not be an appropriate name for the icu dylib. This naming scheme is |
690 | # an attempt to follow the icu convention in naming the dylib and then having symbolic | |
691 | # links of easier to remember library names point it it. *UPDATE* the version and | |
b75a7d8f A |
692 | # sub-version variables as needed. The Core version should be 'A' until the core |
693 | # version changes it's API...that is a new version isn't backwards compatible. | |
694 | # The ICU version/subversion should reflect the actual ICU version. | |
695 | ||
374ca955 | 696 | LIB_NAME = icucore |
0f5d89e8 | 697 | ICU_VERS = 62 |
729e4ab9 | 698 | ICU_SUBVERS = 1 |
b75a7d8f | 699 | CORE_VERS = A |
b75a7d8f | 700 | |
73c04bcf A |
701 | ifeq "$(WINDOWS)" "YES" |
702 | DYLIB_SUFF = dll | |
51004dcb A |
703 | ifeq "$(ARCH64)" "YES" |
704 | winprogdir = /Program\ Files/Common\ Files/Apple/Apple\ Application\ Support/ | |
705 | winintlibdir = /AppleInternal/lib64/ | |
706 | else | |
707 | winprogdir = /Program\ Files\ \(x86\)/Common\ Files/Apple/Apple\ Application\ Support/ | |
708 | winintlibdir = /AppleInternal/lib32/ | |
709 | endif | |
710 | libdir = | |
729e4ab9 A |
711 | else ifeq "$(LINUX)" "YES" |
712 | DYLIB_SUFF = so | |
713 | ifeq "$(ARCH64)" "YES" | |
0f5d89e8 | 714 | libdir = /usr/local/lib/ |
729e4ab9 | 715 | else |
0f5d89e8 | 716 | libdir = /usr/local/lib32/ |
729e4ab9 | 717 | endif |
51004dcb A |
718 | winprogdir = |
719 | winintlibdir = | |
73c04bcf A |
720 | else |
721 | DYLIB_SUFF = dylib | |
722 | libdir = /usr/lib/ | |
51004dcb A |
723 | winprogdir = |
724 | winintlibdir = | |
73c04bcf A |
725 | endif |
726 | ||
374ca955 | 727 | DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF) |
73c04bcf A |
728 | DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF) |
729 | DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF) | |
730 | ifeq "$(WINDOWS)" "YES" | |
731 | INSTALLED_DYLIB = $(LIB_NAME).$(DYLIB_SUFF) | |
732 | INSTALLED_DYLIB_DEBUG = $(LIB_NAME)_debug.$(DYLIB_SUFF) | |
733 | INSTALLED_DYLIB_PROFILE = $(LIB_NAME)_profile.$(DYLIB_SUFF) | |
729e4ab9 A |
734 | else ifeq "$(LINUX)" "YES" |
735 | INSTALLED_DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF) | |
736 | INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF) | |
737 | INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF) | |
73c04bcf A |
738 | else |
739 | INSTALLED_DYLIB = lib$(LIB_NAME).$(CORE_VERS).$(DYLIB_SUFF) | |
740 | INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME).$(CORE_VERS)_debug.$(DYLIB_SUFF) | |
741 | INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME).$(CORE_VERS)_profile.$(DYLIB_SUFF) | |
742 | endif | |
743 | ||
744 | INSTALLED_DYLIB_icu = INSTALLED_DYLIB | |
745 | INSTALLED_DYLIB_debug = INSTALLED_DYLIB_DEBUG | |
746 | INSTALLED_DYLIB_profile = INSTALLED_DYLIB_PROFILE | |
747 | DYLIB_icu = DYLIB | |
748 | DYLIB_debug = DYLIB_DEBUG | |
749 | DYLIB_profile = DYLIB_PROFILE | |
b75a7d8f A |
750 | |
751 | ################################# | |
752 | # Data files | |
753 | ################################# | |
754 | ||
374ca955 A |
755 | OPEN_SOURCE_VERSIONS_DIR=/usr/local/OpenSourceVersions/ |
756 | OPEN_SOURCE_LICENSES_DIR=/usr/local/OpenSourceLicenses/ | |
51004dcb | 757 | |
b75a7d8f A |
758 | B_DATA_FILE=icudt$(ICU_VERS)b.dat |
759 | L_DATA_FILE=icudt$(ICU_VERS)l.dat | |
51004dcb | 760 | DATA_BUILD_SUBDIR= data/out |
0f5d89e8 A |
761 | ifeq "$(LINUX)" "YES" |
762 | DATA_INSTALL_DIR=/usr/local/share/icu/ | |
763 | else | |
51004dcb | 764 | DATA_INSTALL_DIR=/usr/share/icu/ |
0f5d89e8 | 765 | endif |
2ca993e8 | 766 | |
51004dcb A |
767 | # DATA_LOOKUP_DIR is what the target ICU_DATA_DIR gets set to in CFLAGS, CXXFLAGS; |
768 | # DATA_LOOKUP_DIR_BUILDHOST is what any crossbuild host ICU_DATA_DIR gets set to. | |
2ca993e8 A |
769 | # Formerly we had DATA_LOOKUP_DIR=/var/db/icu/ for embedded non-simulator builds |
770 | # and DATA_LOOKUP_DIR=/usr/share/icu/ for everything else. Now all systems look | |
771 | # in the same place for the main data file: | |
0f5d89e8 A |
772 | DATA_LOOKUP_DIR=$(DATA_INSTALL_DIR) |
773 | DATA_LOOKUP_DIR_BUILDHOST=$(DATA_INSTALL_DIR) | |
51004dcb | 774 | |
2ca993e8 | 775 | # Timezone data file(s) |
f3c0d7a5 | 776 | # ICU will look for /var/db/timezone/icutz/icutz44l.dat |
2ca993e8 A |
777 | # If directory or file is not present, the timesone data in |
778 | # current data file e.g. /usr/share/icu/icudt56l.dat will be used. | |
779 | # Currently we are not conditionalizing the definition of | |
780 | # TZDATA_LOOKUP_DIR as in | |
781 | # ifeq "$(BUILD_TYPE)" "DEVICE" | |
f3c0d7a5 | 782 | # TZDATA_LOOKUP_DIR = /var/db/timezone/icutz |
2ca993e8 A |
783 | # else |
784 | # ... | |
785 | # since the code stats the path for TZDATA_LOOKUP_DIR and does | |
786 | # not try to use it if it does not exist. We could define it | |
787 | # as TZDATA_LOOKUP_DIR = /usr/share/icutz when not needed... | |
788 | # TZDATA_LOOKUP_DIR is passed to compiler as U_TIMEZONE_FILES_DIR | |
789 | # TZDATA_PACKAGE is passed to compiler as U_TIMEZONE_PACKAGE | |
f3c0d7a5 | 790 | TZDATA_LOOKUP_DIR = /var/db/timezone/icutz |
2ca993e8 A |
791 | TZDATA_PACKAGE = icutz44l |
792 | TZDATA_FORMAT_STRING = "44l" | |
793 | TZDATA_FORMAT_FILE = icutzformat.txt | |
794 | ||
795 | ||
51004dcb A |
796 | # Name of runtime environment variable to get the prefix path for DATA_LOOKUP_DIR |
797 | # Currently we are only using this for LINUX, should also use for iOS simulator | |
798 | ifeq "$(LINUX)" "YES" | |
799 | DATA_DIR_PREFIX_ENV_VAR=APPLE_FRAMEWORKS_ROOT | |
800 | else | |
801 | DATA_DIR_PREFIX_ENV_VAR= | |
802 | endif | |
b75a7d8f | 803 | |
729e4ab9 | 804 | ################################# |
2ca993e8 | 805 | # Tools |
729e4ab9 A |
806 | ################################# |
807 | ||
808 | localtooldir=/usr/local/bin/ | |
2ca993e8 | 809 | locallibdir=/usr/local/lib/ |
729e4ab9 A |
810 | |
811 | INFOTOOL = icuinfo | |
729e4ab9 A |
812 | INFOTOOL_OBJS = ./tools/icuinfo/icuinfo.o ./tools/toolutil/udbgutil.o ./tools/toolutil/uoptions.o |
813 | ||
a62d09fc A |
814 | ICUZDUMPTOOL = icuzdump |
815 | ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES" | |
816 | ICUZDUMPTOOL_OBJS = ./tools/tzcode/icuzdump.o $(IO_OBJ) | |
817 | else | |
818 | ICUZDUMPTOOL_OBJS = ./tools/tzcode/icuzdump.o | |
819 | endif | |
820 | ||
2ca993e8 A |
821 | TOOLSLIB_NAME = icutu |
822 | TOOLS_DYLIB = libicutu.$(DYLIB_SUFF) | |
823 | TOOLS_DYLIB_OBJS = ./tools/toolutil/*.o | |
a62d09fc A |
824 | |
825 | # The following modified version enables the tz toools to be used on systems with ICU 55 or later. | |
826 | # It is used with the toolchain tools below. | |
827 | TOOLSLIB_NAME_FORTOOLS = icutux | |
828 | TOOLS_DYLIB_FORTOOLS = libicutux.$(DYLIB_SUFF) | |
829 | TOOLS_DYLIB_OBJS_FORTOOLS = ./tools/toolutil/collationinfo.o ./tools/toolutil/filestrm.o \ | |
2ca993e8 A |
830 | ./tools/toolutil/package.o ./tools/toolutil/pkg_icu.o ./tools/toolutil/pkgitems.o \ |
831 | ./tools/toolutil/swapimpl.o ./tools/toolutil/toolutil.o ./tools/toolutil/ucbuf.o \ | |
832 | ./tools/toolutil/unewdata.o ./tools/toolutil/uoptions.o ./tools/toolutil/uparse.o \ | |
833 | $(COMMON_OBJ) $(STUB_DATA_OBJ) | |
834 | ||
835 | ZICTOOL = icuzic | |
836 | ZICTOOL_OBJS = ./tools/tzcode/zic.o ./tools/tzcode/localtime.o ./tools/tzcode/asctime.o ./tools/tzcode/scheck.o ./tools/tzcode/ialloc.o | |
837 | ||
838 | RESTOOL = icugenrb | |
839 | RESTOOL_OBJS = ./tools/genrb/errmsg.o ./tools/genrb/genrb.o ./tools/genrb/parse.o ./tools/genrb/read.o ./tools/genrb/reslist.o ./tools/genrb/ustr.o \ | |
840 | ./tools/genrb/rbutil.o ./tools/genrb/wrtjava.o ./tools/genrb/rle.o ./tools/genrb/wrtxml.o ./tools/genrb/prscmnts.o | |
841 | ||
842 | # note there is also a symbol ICUPKGTOOL which refers to the one used | |
843 | # internally which is linked against the separate uc and i18n libs. | |
844 | PKGTOOL = icupkg | |
845 | PKGTOOL_OBJS = ./tools/icupkg/icupkg.o | |
846 | ||
847 | TZ2ICUTOOL = tz2icu | |
848 | TZ2ICUTOOL_OBJS = ./tools/tzcode/tz2icu.o | |
849 | ||
a62d09fc A |
850 | GENBRKTOOL = icugenbrk |
851 | GENBRKTOOL_OBJS = ./tools/genbrk/genbrk.o | |
2ca993e8 | 852 | |
57a6839d | 853 | ################################# |
f3c0d7a5 | 854 | # Ancillary files |
57a6839d A |
855 | # e.g. supplementalData.xml, per <rdar://problem/13426014> |
856 | # These are like internal headers in that they are only installed for | |
857 | # (other) projects to build against, not needed at runtime. | |
f3c0d7a5 | 858 | # Install during installhdrs? That does not seem to work for CLDRFILESDIR |
57a6839d A |
859 | ################################# |
860 | ||
861 | CLDRFILESDIR=/usr/local/share/cldr | |
862 | ||
f3c0d7a5 A |
863 | EMOJI_DATA_DIR=/usr/local/share/emojiData |
864 | ||
374ca955 A |
865 | ################################# |
866 | # Environment variables | |
867 | ################################# | |
868 | ||
869 | # $(RC_ARCHS:%=-arch %) is a substitution reference. It denotes, in this case, | |
870 | # for every value <val> in RC_ARCHS, replace it with "-arch <val>". Substitution | |
871 | # references have the form $(var:a=b). We can insert the strip and prebinding commands | |
872 | # into CFLAGS (and CXXFLAGS). This controls a lot of the external variables so we don't | |
873 | # need to directly modify the ICU files (like for CFLAGS, etc). | |
874 | ||
51004dcb A |
875 | LIBOVERRIDES=LIBICUDT="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \ |
876 | LIBICUUC="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \ | |
877 | LIBICUI18N="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" | |
374ca955 | 878 | |
46f4442e A |
879 | # For normal Windows builds set the ENV= options here; for debug Windows builds set the ENV_DEBUG= |
880 | # options here and also the update the LINK.EXE lines in the TARGETS section below. | |
73c04bcf | 881 | ifeq "$(WINDOWS)" "YES" |
51004dcb | 882 | ifeq "$(ARCH64)" "YES" |
4f1e1a09 A |
883 | ENV= CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \ |
884 | CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1" \ | |
51004dcb | 885 | LDFLAGS="/NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF" |
73c04bcf | 886 | else |
4f1e1a09 A |
887 | ENV= CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \ |
888 | CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1" \ | |
51004dcb | 889 | LDFLAGS="/NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF" |
73c04bcf | 890 | endif |
51004dcb | 891 | ENV_CONFIGURE= CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \ |
4f1e1a09 A |
892 | CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \ |
893 | CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1" | |
894 | ENV_DEBUG= CFLAGS="/utf-8 /O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \ | |
895 | CXXFLAGS="/utf-8 /O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /DU_SHOW_CPLUSPLUS_API=1" \ | |
51004dcb | 896 | LDFLAGS="/DEBUG /DYNAMICBASE" |
73c04bcf | 897 | ENV_PROFILE= |
729e4ab9 | 898 | else ifeq "$(LINUX)" "YES" |
729e4ab9 | 899 | ifeq "$(ARCH64)" "YES" |
51004dcb | 900 | ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 901 | LANG="en_US.utf8" \ |
51004dcb | 902 | CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \ |
729e4ab9 A |
903 | CC="$(CC)" \ |
904 | CXX="$(CXX)" \ | |
51004dcb | 905 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 906 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 907 | TZDATA="$(TZDATA)" \ |
0f5d89e8 | 908 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
51004dcb A |
909 | |
910 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
0f5d89e8 | 911 | LANG="en_US.utf8" \ |
729e4ab9 A |
912 | CC="$(CC)" \ |
913 | CXX="$(CXX)" \ | |
51004dcb | 914 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 915 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 916 | TZDATA="$(TZDATA)" \ |
0f5d89e8 | 917 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
51004dcb A |
918 | |
919 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
0f5d89e8 | 920 | LANG="en_US.utf8" \ |
729e4ab9 A |
921 | CC="$(CC)" \ |
922 | CXX="$(CXX)" \ | |
51004dcb | 923 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 924 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 925 | TZDATA="$(TZDATA)" \ |
0f5d89e8 | 926 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
2ca993e8 | 927 | |
51004dcb | 928 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 929 | LANG="en_US.utf8" \ |
729e4ab9 A |
930 | CC="$(CC)" \ |
931 | CXX="$(CXX)" \ | |
51004dcb | 932 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 933 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 934 | TZDATA="$(TZDATA)" \ |
0f5d89e8 | 935 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
729e4ab9 | 936 | else |
51004dcb | 937 | ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 938 | LANG="en_US.utf8" \ |
51004dcb | 939 | CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \ |
729e4ab9 A |
940 | CC="$(CC)" \ |
941 | CXX="$(CXX)" \ | |
51004dcb | 942 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 943 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 944 | TZDATA="$(TZDATA)" \ |
2ca993e8 A |
945 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
946 | ||
51004dcb | 947 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 948 | LANG="en_US.utf8" \ |
729e4ab9 A |
949 | CC="$(CC)" \ |
950 | CXX="$(CXX)" \ | |
51004dcb | 951 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 952 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 953 | TZDATA="$(TZDATA)" \ |
2ca993e8 A |
954 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
955 | ||
51004dcb | 956 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 957 | LANG="en_US.utf8" \ |
729e4ab9 A |
958 | CC="$(CC)" \ |
959 | CXX="$(CXX)" \ | |
51004dcb | 960 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 961 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 962 | TZDATA="$(TZDATA)" \ |
2ca993e8 A |
963 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
964 | ||
51004dcb | 965 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
0f5d89e8 | 966 | LANG="en_US.utf8" \ |
729e4ab9 A |
967 | CC="$(CC)" \ |
968 | CXX="$(CXX)" \ | |
51004dcb | 969 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden" \ |
9f1b1155 | 970 | CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 971 | TZDATA="$(TZDATA)" \ |
2ca993e8 | 972 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
729e4ab9 | 973 | endif |
73c04bcf | 974 | else |
2ca993e8 | 975 | CPPOPTIONS = |
51004dcb A |
976 | ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
977 | CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(ISYSROOT) $(ENV_CONFIGURE_ARCHS)" \ | |
729e4ab9 A |
978 | CC="$(CC)" \ |
979 | CXX="$(CXX)" \ | |
2ca993e8 | 980 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
f3c0d7a5 | 981 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
729e4ab9 A |
982 | RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\ |
983 | TZDATA="$(TZDATA)" \ | |
2ca993e8 A |
984 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
985 | ||
51004dcb | 986 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
987 | CC="$(CC)" \ |
988 | CXX="$(CXX)" \ | |
2ca993e8 | 989 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
f3c0d7a5 | 990 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
73c04bcf A |
991 | RC_ARCHS="$(RC_ARCHS)" \ |
992 | TZDATA="$(TZDATA)" \ | |
2ca993e8 A |
993 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
994 | ||
51004dcb | 995 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
996 | CC="$(CC)" \ |
997 | CXX="$(CXX)" \ | |
2ca993e8 | 998 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
f3c0d7a5 | 999 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
73c04bcf A |
1000 | RC_ARCHS="$(RC_ARCHS)" \ |
1001 | TZDATA="$(TZDATA)" \ | |
2ca993e8 A |
1002 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
1003 | ||
51004dcb | 1004 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
1005 | CC="$(CC)" \ |
1006 | CXX="$(CXX)" \ | |
2ca993e8 | 1007 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
f3c0d7a5 | 1008 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
73c04bcf A |
1009 | RC_ARCHS="$(RC_ARCHS)" \ |
1010 | TZDATA="$(TZDATA)" \ | |
2ca993e8 | 1011 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
51004dcb A |
1012 | |
1013 | ENV_CONFIGURE_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
1014 | CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(HOSTISYSROOT)" \ | |
1015 | CC="$(HOSTCC)" \ | |
1016 | CXX="$(HOSTCXX)" \ | |
57a6839d | 1017 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ |
f3c0d7a5 | 1018 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
729e4ab9 | 1019 | TZDATA="$(TZDATA)" \ |
2ca993e8 A |
1020 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
1021 | ||
51004dcb A |
1022 | ENV_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
1023 | CC="$(HOSTCC)" \ | |
1024 | CXX="$(HOSTCXX)" \ | |
57a6839d | 1025 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ |
f3c0d7a5 | 1026 | CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ |
73c04bcf | 1027 | TZDATA="$(TZDATA)" \ |
2ca993e8 | 1028 | DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib" |
729e4ab9 | 1029 | |
73c04bcf | 1030 | endif |
2ca993e8 | 1031 | |
374ca955 A |
1032 | ENV_icu = ENV |
1033 | ENV_debug = ENV_DEBUG | |
73c04bcf | 1034 | ENV_profile = ENV_PROFILE |
374ca955 | 1035 | |
57a6839d A |
1036 | ifeq "$(BUILD_TYPE)" "DEVICE" |
1037 | ORDERFILE=$(SDKPATH)/AppleInternal/OrderFiles/libicucore.order | |
2ca993e8 | 1038 | else ifeq "$(BUILD_TYPE)" "SIMULATOR" |
46f4442e A |
1039 | ORDERFILE=$(SRCROOT)/ICU_embedded.order |
1040 | else | |
1041 | ORDERFILE=/usr/local/lib/OrderFiles/libicucore.order | |
1042 | endif | |
374ca955 A |
1043 | ifeq "$(shell test -f $(ORDERFILE) && echo YES )" "YES" |
1044 | SECTORDER_FLAGS=-sectorder __TEXT __text $(ORDERFILE) | |
1045 | else | |
1046 | SECTORDER_FLAGS= | |
1047 | endif | |
1048 | ||
1049 | ||
b75a7d8f A |
1050 | ################################# |
1051 | ################################# | |
1052 | # TARGETS | |
1053 | ################################# | |
1054 | ################################# | |
374ca955 | 1055 | |
2ca993e8 A |
1056 | .PHONY : icu check installsrc installhdrs installhdrsint clean install debug debug-install \ |
1057 | crossbuildhost icutztoolsforsdk | |
374ca955 A |
1058 | .DELETE_ON_ERROR : |
1059 | ||
2ca993e8 A |
1060 | # Rule for adjusting sources for different train types. |
1061 | # Assumes current directory is icuSources to be patched. | |
1062 | # This may be: | |
1063 | # $(SRCROOT)/icuSources for installsrc, or | |
1064 | # $(OBJROOT_CURRENT) if sources are copied for e.g. a local make. | |
1065 | # | |
1066 | # The various patchconfig files should assume the current directory is icuSources. | |
1067 | # | |
4f1e1a09 A |
1068 | # Note that if sources have been installed by installsrc (only run as part of buildit or |
1069 | # submitproject for Apple platforms, not for Windows/Linux), then | |
1070 | # $(SRCROOT)/installsrcNotRunFlag is not present, and | |
2ca993e8 | 1071 | # ADJUST_SOURCES has already have been run. |
4f1e1a09 A |
1072 | # Otherwise, if we are doing a local build (e.g. make check, make install), or if |
1073 | # sources were submitted using submitproject for non-Apple platforms (Windows/Linux) then | |
1074 | # $(SRCROOT)/installsrcNotRunFlag is present, and | |
2ca993e8 A |
1075 | # ADJUST_SOURCES has not been run (run it after copying sources to OBJROOT_CURRENT) |
1076 | # | |
1077 | ||
1078 | ADJUST_SOURCES = \ | |
1079 | if test "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \ | |
1080 | patch -p1 <$(SRCROOT)/minimalpatchconfig.txt; \ | |
1081 | elif test "$(WINDOWS)" = "YES"; then \ | |
1082 | patch -p1 <$(SRCROOT)/windowspatchconfig.txt; \ | |
1083 | else \ | |
1084 | patch -p1 <$(SRCROOT)/patchconfig.txt; \ | |
1085 | fi; \ | |
1086 | if test "$(WINDOWS)" = "YES"; then \ | |
1087 | mv data/unidata/base_unidata/*.txt data/unidata/; \ | |
1088 | mv data/unidata/norm2/base_norm2/*.txt data/unidata/norm2/; \ | |
1089 | mv data/in/base_in/*.nrm data/in/; \ | |
1090 | mv data/in/base_in/*.icu data/in/; \ | |
1091 | elif test "$(LINUX)" = "YES"; then \ | |
1092 | mv data/unidata/base_unidata/*.txt data/unidata/; \ | |
1093 | mv data/unidata/norm2/base_norm2/*.txt data/unidata/norm2/; \ | |
1094 | mv data/in/base_in/*.nrm data/in/; \ | |
1095 | mv data/in/base_in/*.icu data/in/; \ | |
1096 | fi | |
1097 | ||
1098 | ||
51004dcb A |
1099 | icu debug profile : $(OBJROOT_CURRENT)/Makefile |
1100 | echo "# make for target"; | |
1101 | (cd $(OBJROOT_CURRENT); \ | |
0f5d89e8 | 1102 | $(MAKE) $($(ENV_$@)) || exit 1; \ |
73c04bcf | 1103 | if test "$(WINDOWS)" = "YES"; then \ |
729e4ab9 A |
1104 | (cd common; \ |
1105 | rc.exe /folibicuuc.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \ | |
1106 | "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 libicuuc.rc; \ | |
1107 | ); \ | |
1108 | (cd i18n; \ | |
1109 | rc.exe /folibicuin.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common libicuin.rc; \ | |
1110 | ); \ | |
73c04bcf A |
1111 | if test "$@" = "debug"; then \ |
1112 | (cd common; \ | |
729e4ab9 A |
1113 | LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a800000" /DYNAMICBASE /DEBUG \ |
1114 | /IMPLIB:../lib/libicuuc_$@.lib /out:../lib/libicuuc_$@.dll \ | |
1115 | *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \ | |
1116 | ); \ | |
73c04bcf | 1117 | (cd i18n; \ |
729e4ab9 A |
1118 | LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a900000" /DYNAMICBASE /DEBUG \ |
1119 | /IMPLIB:../lib/libicuin_$@.lib /out:../lib/libicuin_$@.dll \ | |
1120 | *.o libicuin.res ../lib/libicuuc_$@.lib ../stubdata/icudt.lib advapi32.lib; \ | |
1121 | ); \ | |
1122 | else \ | |
729e4ab9 | 1123 | (cd common; \ |
729e4ab9 | 1124 | rm -f ../lib/libicuuc.dll.manifest; \ |
51004dcb A |
1125 | if test "$(ARCH64)" = "YES"; then \ |
1126 | LINK.EXE /DLL /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ | |
1127 | /IMPLIB:../lib/libicuuc.lib /out:../lib/libicuuc.dll \ | |
1128 | *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \ | |
1129 | else \ | |
1130 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ | |
1131 | /IMPLIB:../lib/libicuuc.lib /out:../lib/libicuuc.dll \ | |
1132 | *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \ | |
1133 | fi; \ | |
729e4ab9 | 1134 | mt.exe -nologo -manifest ../lib/libicuuc.dll.manifest -outputresource:"../lib/libicuuc.dll;2"; \ |
729e4ab9 A |
1135 | ); \ |
1136 | (cd i18n; \ | |
729e4ab9 | 1137 | rm -f ../lib/libicuin.dll.manifest; \ |
51004dcb A |
1138 | if test "$(ARCH64)" = "YES"; then \ |
1139 | LINK.EXE /DLL /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ | |
1140 | /IMPLIB:../lib/libicuin.lib /out:../lib/libicuin.dll \ | |
1141 | *.o libicuin.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \ | |
1142 | else \ | |
1143 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ | |
1144 | /IMPLIB:../lib/libicuin.lib /out:../lib/libicuin.dll \ | |
1145 | *.o libicuin.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \ | |
1146 | fi; \ | |
729e4ab9 | 1147 | mt.exe -nologo -manifest ../lib/libicuin.dll.manifest -outputresource:"../lib/libicuin.dll;2"; \ |
729e4ab9 | 1148 | ); \ |
73c04bcf | 1149 | fi; \ |
374ca955 | 1150 | else \ |
729e4ab9 A |
1151 | if test "$(LINUX)" = "YES"; then \ |
1152 | if test "$(ARCH64)" = "YES"; then \ | |
1153 | $($(ENV_$@)) $(CXX) \ | |
1154 | -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \ | |
1155 | $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -Wl,-L/usr/lib64/ -ldl \ | |
1156 | -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ | |
1157 | else \ | |
1158 | $($(ENV_$@)) $(CXX) \ | |
1159 | -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \ | |
1160 | $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -ldl \ | |
1161 | -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ | |
1162 | fi; \ | |
1163 | else \ | |
1164 | tmpfile=`mktemp -t weakexternal.XXXXXX` || exit 1; \ | |
4388f060 | 1165 | $(NM) -m $(RC_ARCHS:%=-arch %) $(DYLIB_OBJS) | fgrep "weak external" | fgrep -v "undefined" | sed -e 's/.*weak external[^_]*//' | sort | uniq | cat >$$tmpfile; \ |
0f5d89e8 A |
1166 | if test ! "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \ |
1167 | ZIPPERING_LDFLAGS=-Wl,-iosmac_version_min,12.0; \ | |
1168 | fi; \ | |
729e4ab9 | 1169 | $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \ |
4388f060 | 1170 | $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ |
0f5d89e8 | 1171 | $(CXXFLAGS) $(LDFLAGS) $$ZIPPERING_LDFLAGS -single_module $(SECTORDER_FLAGS) -unexported_symbols_list $$tmpfile -dead_strip \ |
729e4ab9 A |
1172 | -install_name $(libdir)$($(INSTALLED_DYLIB_$@)) -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ |
1173 | if test "$@" = "icu"; then \ | |
1174 | ln -fs $(INSTALLED_DYLIB) $(DYLIB); \ | |
2ca993e8 | 1175 | echo '# build' $(INFOTOOL) 'linked against' $(LIB_NAME) ; \ |
f3c0d7a5 | 1176 | $($(ENV_$@)) $(CXX) --std=c++11 $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ |
57a6839d | 1177 | $(LDFLAGS) -dead_strip -o ./$(INFOTOOL) $(INFOTOOL_OBJS) -L./ -l$(LIB_NAME) ; \ |
2ca993e8 A |
1178 | echo '# build' $(TOOLS_DYLIB) 'linked against' $(LIB_NAME) ; \ |
1179 | $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \ | |
1180 | $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ | |
1181 | $(CXXFLAGS) $(LDFLAGS) -single_module \ | |
1182 | -install_name $(locallibdir)$(TOOLS_DYLIB) -o ./$(TOOLS_DYLIB) $(TOOLS_DYLIB_OBJS) -L./ -l$(LIB_NAME) ; \ | |
1183 | echo '# build' $(ICUZDUMPTOOL) 'linked against' $(TOOLSLIB_NAME) $(LIB_NAME) ; \ | |
f3c0d7a5 | 1184 | $($(ENV_$@)) $(LINK.cc) $(RC_ARCHS:%=-arch %) -g -Os $(ISYSROOT) $(THUMB_FLAG) --std=c++11 \ |
2ca993e8 | 1185 | -dead_strip -o ./$(ICUZDUMPTOOL) $(ICUZDUMPTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME) -l$(LIB_NAME); \ |
729e4ab9 A |
1186 | fi; \ |
1187 | fi; \ | |
51004dcb A |
1188 | if test -f ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); then \ |
1189 | ln -fs ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); \ | |
73c04bcf | 1190 | fi; \ |
51004dcb A |
1191 | if test -f ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); then \ |
1192 | ln -fs ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); \ | |
73c04bcf | 1193 | else \ |
729e4ab9 | 1194 | DYLD_LIBRARY_PATH=$(ICUPKGTOOLIBS) \ |
51004dcb | 1195 | $(ICUPKGTOOL) -tl ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE) $(L_DATA_FILE); \ |
73c04bcf | 1196 | fi; \ |
2ca993e8 | 1197 | printf $(TZDATA_FORMAT_STRING) > $(TZDATA_FORMAT_FILE); \ |
374ca955 A |
1198 | fi; \ |
1199 | ); | |
1200 | ||
729e4ab9 | 1201 | crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile |
51004dcb | 1202 | echo "# make for crossbuild host"; |
729e4ab9 | 1203 | (cd $(CROSSHOST_OBJROOT); \ |
0f5d89e8 | 1204 | $(MAKE) $($(ENV_BUILDHOST)) || exit 1; \ |
729e4ab9 A |
1205 | ); |
1206 | ||
2ca993e8 | 1207 | # For the install-icutztoolsforsdk target, SDKROOT will always be an OSX SDK root. |
a62d09fc | 1208 | # If the sources were installed using the minimalpatchconfig.txt patch, then |
2ca993e8 | 1209 | # we need to patch using crosshostpatchconfig.txt as for $(CROSSHOST_OBJROOT)/Makefile |
a62d09fc | 1210 | # (otherwise we ignore the patch in crosshostpatchconfig.txt, using -N) |
2ca993e8 A |
1211 | icutztoolsforsdk : $(OBJROOT_CURRENT)/Makefile |
1212 | echo "# make icutztoolsforsdk"; | |
1213 | (cd $(OBJROOT_CURRENT); \ | |
4f1e1a09 | 1214 | if test ! -e $(SRCROOT)/installsrcNotRunFlag ; then patch -N -p1 <$(SRCROOT)/crosshostpatchconfig.txt; fi; \ |
0f5d89e8 | 1215 | $(MAKE) $($(ENV)) || exit 1; \ |
a62d09fc | 1216 | echo '# build' $(TOOLS_DYLIB_FORTOOLS) 'linked against' $(LIB_NAME) ; \ |
2ca993e8 A |
1217 | $($(ENV)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \ |
1218 | -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) \ | |
1219 | $(CXXFLAGS) $(LDFLAGS) -single_module \ | |
a62d09fc A |
1220 | -install_name $(locallibdir)$(TOOLS_DYLIB_FORTOOLS) -o ./$(TOOLS_DYLIB_FORTOOLS) $(TOOLS_DYLIB_OBJS_FORTOOLS) -L./ -l$(LIB_NAME) ; \ |
1221 | echo '# build' $(ZICTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \ | |
f3c0d7a5 | 1222 | $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \ |
a62d09fc A |
1223 | $(LDFLAGS) -dead_strip -o ./$(ZICTOOL) $(ZICTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \ |
1224 | echo '# build' $(RESTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) $(LIB_NAME) ; \ | |
f3c0d7a5 | 1225 | $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \ |
a62d09fc A |
1226 | $(LDFLAGS) -dead_strip -o ./$(RESTOOL) $(RESTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) -l$(LIB_NAME) ; \ |
1227 | echo '# build' $(PKGTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \ | |
f3c0d7a5 | 1228 | $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \ |
a62d09fc A |
1229 | $(LDFLAGS) -dead_strip -o ./$(PKGTOOL) $(PKGTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \ |
1230 | echo '# build' $(TZ2ICUTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \ | |
f3c0d7a5 | 1231 | $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \ |
a62d09fc A |
1232 | $(LDFLAGS) -dead_strip -o ./$(TZ2ICUTOOL) $(TZ2ICUTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \ |
1233 | echo '# build' $(GENBRKTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \ | |
f3c0d7a5 | 1234 | $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \ |
a62d09fc | 1235 | $(LDFLAGS) -dead_strip -o ./$(GENBRKTOOL) $(GENBRKTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \ |
2ca993e8 A |
1236 | ); |
1237 | ||
374ca955 | 1238 | check : icu |
729e4ab9 | 1239 | ifneq "$(CROSS_BUILD)" "YES" |
51004dcb A |
1240 | (cd $(OBJROOT_CURRENT); \ |
1241 | ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV) check; \ | |
73c04bcf | 1242 | ); |
729e4ab9 A |
1243 | else |
1244 | $(warning check not supported for cross-build) | |
1245 | endif | |
73c04bcf A |
1246 | |
1247 | check-debug: debug | |
729e4ab9 | 1248 | ifneq "$(CROSS_BUILD)" "YES" |
51004dcb A |
1249 | (cd $(OBJROOT_CURRENT); \ |
1250 | ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV_DEBUG) check; \ | |
374ca955 | 1251 | ); |
729e4ab9 A |
1252 | else |
1253 | $(warning check not supported for cross-build) | |
1254 | endif | |
374ca955 A |
1255 | |
1256 | samples: icu | |
51004dcb | 1257 | (cd $(OBJROOT_CURRENT)/samples; \ |
374ca955 A |
1258 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ |
1259 | ); | |
1260 | ||
1261 | extra: icu | |
51004dcb | 1262 | (cd $(OBJROOT_CURRENT)/extra; \ |
374ca955 A |
1263 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ |
1264 | ); | |
1265 | ||
729e4ab9 | 1266 | ifneq "$(CROSS_BUILD)" "YES" |
2ca993e8 | 1267 | $(OBJROOT_CURRENT)/Makefile : |
729e4ab9 | 1268 | else |
51004dcb | 1269 | $(OBJROOT_CURRENT)/Makefile : crossbuildhost |
729e4ab9 | 1270 | endif |
51004dcb A |
1271 | if test ! -d $(OBJROOT_CURRENT); then \ |
1272 | mkdir -p $(OBJROOT_CURRENT); \ | |
374ca955 | 1273 | fi; |
51004dcb | 1274 | cp -Rpf $(SRCROOT)/icuSources/* $(OBJROOT_CURRENT)/; |
2ca993e8 | 1275 | (cd $(OBJROOT_CURRENT); \ |
4f1e1a09 | 1276 | if test -e $(SRCROOT)/installsrcNotRunFlag ; then $(ADJUST_SOURCES); fi; \ |
f3c0d7a5 A |
1277 | if test -f $(TZAUXFILESDIR)/metaZones.txt ; then cp -p $(TZAUXFILESDIR)/metaZones.txt data/misc/; fi; \ |
1278 | if test -f $(TZAUXFILESDIR)/timezoneTypes.txt ; then cp -p $(TZAUXFILESDIR)/timezoneTypes.txt data/misc/; fi; \ | |
1279 | if test -f $(TZAUXFILESDIR)/windowsZones.txt ; then cp -p $(TZAUXFILESDIR)/windowsZones.txt data/misc/; fi; \ | |
1280 | if test -f $(TZAUXFILESDIR)/icuregions ; then cp -p $(TZAUXFILESDIR)/icuregions tools/tzcode/; fi; \ | |
1281 | if test -f $(TZAUXFILESDIR)/icuzones ; then cp -p $(TZAUXFILESDIR)/icuzones tools/tzcode/; fi; \ | |
2ca993e8 A |
1282 | if test "$(WINDOWS)" = "YES"; then \ |
1283 | echo "# configure for target"; \ | |
1284 | $(ENV_CONFIGURE) ./runConfigureICU Cygwin/MSVC $(CONFIG_FLAGS); \ | |
1285 | elif test "$(LINUX)" = "YES"; then \ | |
1286 | echo "# configure for target"; \ | |
1287 | $(ENV_CONFIGURE) ./runConfigureICU Linux $(CONFIG_FLAGS); \ | |
1288 | elif test "$(CROSS_BUILD)" = "YES"; then \ | |
1289 | echo "# configure for crossbuild target"; \ | |
1290 | $(ENV_CONFIGURE) ./configure --host=$(TARGET_SPEC) --with-cross-build=$(CROSSHOST_OBJROOT) $(CONFIG_FLAGS); \ | |
1291 | else \ | |
1292 | echo "# configure for non-crossbuild target"; \ | |
1293 | $(ENV_CONFIGURE) ./runConfigureICU MacOSX $(CONFIG_FLAGS); \ | |
1294 | fi; \ | |
1295 | ); | |
729e4ab9 A |
1296 | |
1297 | # for the tools that build the data file, cannot set UDATA_DEFAULT_ACCESS = UDATA_ONLY_PACKAGES | |
2ca993e8 A |
1298 | # as minimalpatchconfig.txt does; need different patches for the host build. Thus |
1299 | # we have to use crosshostpatchconfig.txt to undo the udata.h changes that would have | |
1300 | # been made for ICU_FOR_EMBEDDED_TRAINS builds. | |
1301 | $(CROSSHOST_OBJROOT)/Makefile : | |
729e4ab9 A |
1302 | if test ! -d $(CROSSHOST_OBJROOT); then \ |
1303 | mkdir -p $(CROSSHOST_OBJROOT); \ | |
1304 | fi; | |
4388f060 | 1305 | cp -Rpf $(SRCROOT)/icuSources/* $(CROSSHOST_OBJROOT); |
2ca993e8 | 1306 | (cd $(CROSSHOST_OBJROOT); \ |
4f1e1a09 | 1307 | if test -e $(SRCROOT)/installsrcNotRunFlag; then $(ADJUST_SOURCES); fi; \ |
f3c0d7a5 A |
1308 | if test -f $(TZAUXFILESDIR)/metaZones.txt ; then cp -p $(TZAUXFILESDIR)/metaZones.txt data/misc/; fi; \ |
1309 | if test -f $(TZAUXFILESDIR)/timezoneTypes.txt ; then cp -p $(TZAUXFILESDIR)/timezoneTypes.txt data/misc/; fi; \ | |
1310 | if test -f $(TZAUXFILESDIR)/windowsZones.txt ; then cp -p $(TZAUXFILESDIR)/windowsZones.txt data/misc/; fi; \ | |
1311 | if test -f $(TZAUXFILESDIR)/icuregions ; then cp -p $(TZAUXFILESDIR)/icuregions tools/tzcode/; fi; \ | |
1312 | if test -f $(TZAUXFILESDIR)/icuzones ; then cp -p $(TZAUXFILESDIR)/icuzones tools/tzcode/; fi; \ | |
2ca993e8 A |
1313 | if test "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \ |
1314 | patch -p1 <$(SRCROOT)/crosshostpatchconfig.txt; \ | |
1315 | fi; \ | |
1316 | echo "# configure for crossbuild host"; \ | |
1317 | $(ENV_CONFIGURE_BUILDHOST) ./runConfigureICU MacOSX $(CONFIG_FLAGS); \ | |
1318 | ); | |
374ca955 A |
1319 | |
1320 | ################################# | |
1321 | # B&I TARGETS | |
1322 | ################################# | |
1323 | ||
2ca993e8 | 1324 | # Since our sources are in icuSources (ignore the ICU subdirectory for now), we wish to |
b75a7d8f | 1325 | # copy them to somewhere else. We tar it to stdout, cd to the appropriate directory, and |
4f1e1a09 A |
1326 | # untar from stdin. |
1327 | # Do NOT include installsrcNotRunFlag in the list of files to tar up, that defeats the purpose. | |
b75a7d8f A |
1328 | |
1329 | installsrc : | |
1330 | if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi; | |
1331 | if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi; | |
0f5d89e8 | 1332 | tar cf - ./makefile ./ICU.plist ./LICENSE ./icuSources ./cldrFiles ./emojiData ./modules $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \ |
2ca993e8 | 1333 | (cd $(SRCROOT)/icuSources; $(ADJUST_SOURCES) ); |
b75a7d8f | 1334 | |
2ca993e8 A |
1335 | # This works. Just not for ~ in the DSTROOT. We run configure first (in case it hasn't |
1336 | # been already). Then we make the install-headers target on specific makefiles (since | |
b75a7d8f A |
1337 | # not every subdirectory/sub-component has a install-headers target). |
1338 | ||
2ca993e8 A |
1339 | # installhdrs should be no-op for BUILD_TYPE=TOOL |
1340 | ifeq "$(BUILD_TYPE)" "TOOL" | |
46f4442e A |
1341 | installhdrs : |
1342 | else | |
1343 | installhdrs : installhdrsint | |
1344 | endif | |
2ca993e8 A |
1345 | |
1346 | MKINSTALLDIRS=$(SHELL) $(SRCROOT)/icuSources/mkinstalldirs | |
1347 | INSTALL_DATA=${INSTALL} -m 644 | |
1348 | ||
4f1e1a09 A |
1349 | ifneq "$(ICU_FOR_APPLE_PLATFORMS)" "YES" |
1350 | installhdrsint : $(OBJROOT_CURRENT)/Makefile | |
1351 | else ifneq "$(RC_XBS)" "YES" | |
51004dcb | 1352 | installhdrsint : $(OBJROOT_CURRENT)/Makefile |
4f1e1a09 A |
1353 | else |
1354 | installhdrsint : | |
2ca993e8 | 1355 | endif |
4f1e1a09 | 1356 | (if test -e $(SRCROOT)/installsrcNotRunFlag; then cd $(OBJROOT_CURRENT); else cd $(SRCROOT)/icuSources/; fi; \ |
2ca993e8 | 1357 | $(MKINSTALLDIRS) $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/; \ |
73c04bcf | 1358 | for subdir in $(HDR_MAKE_SUBDIR); do \ |
2ca993e8 A |
1359 | echo "# Subdir $$subdir"; \ |
1360 | (cd $$subdir/unicode; \ | |
1361 | for i in *.h; do \ | |
1362 | echo "$(INSTALL_DATA) $$i $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/"; \ | |
1363 | $(INSTALL_DATA) $$i $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/ || exit; \ | |
1364 | done; \ | |
1365 | ); \ | |
73c04bcf | 1366 | done; \ |
2ca993e8 A |
1367 | if test "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \ |
1368 | if test ! -d $(DSTROOT)/$(HDR_PREFIX)/include/unicode/; then \ | |
1369 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(HDR_PREFIX)/include/unicode/; \ | |
729e4ab9 | 1370 | fi; \ |
2ca993e8 A |
1371 | if test -d $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/; then \ |
1372 | (cd $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode; \ | |
729e4ab9 A |
1373 | for i in *.h; do \ |
1374 | if fgrep -q -x $$i $(SRCROOT)/minimalapis.txt ; then \ | |
2ca993e8 | 1375 | mv $$i $(DSTROOT)/$(HDR_PREFIX)/include/unicode ; \ |
729e4ab9 A |
1376 | fi ; \ |
1377 | done ); \ | |
2ca993e8 A |
1378 | if test ! "$(RC_XBS)" = "YES"; then \ |
1379 | echo "# Not building for XBS, so running minimal test"; \ | |
1380 | $(CC) $(SRCROOT)/minimalapisTest.c $(INSTALLHDRS_ARCH) $(ISYSROOT) -nostdinc \ | |
1381 | -I $(DSTROOT)/$(HDR_PREFIX)/include/ -I $(SDKPATH)/usr/include/ -E > /dev/null ; \ | |
1382 | fi; \ | |
57a6839d | 1383 | fi; \ |
0f5d89e8 A |
1384 | $(INSTALL_DATA) $(SRCROOT)/modules/embedded/module.modulemap $(DSTROOT)/$(HDR_PREFIX)/include/unicode/ ; \ |
1385 | $(INSTALL_DATA) $(SRCROOT)/modules/embedded/module.private.modulemap $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/ ; \ | |
1386 | else \ | |
1387 | if test "$(ICU_FOR_APPLE_PLATFORMS)" = "YES"; then \ | |
1388 | $(INSTALL_DATA) $(SRCROOT)/modules/macos/module.private.modulemap $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/ ; \ | |
1389 | fi; \ | |
729e4ab9 | 1390 | fi; \ |
73c04bcf | 1391 | ); |
374ca955 | 1392 | |
2ca993e8 A |
1393 | # We run configure and run make first. This generates the .o files. We then link them |
1394 | # all up together into libicucore. Then we put it into its install location, create | |
1395 | # symbolic links, and then strip the main dylib. Then install the remaining libraries. | |
b75a7d8f | 1396 | # We cleanup the sources folder. |
73c04bcf | 1397 | |
46f4442e | 1398 | install : installhdrsint icu |
73c04bcf | 1399 | if test "$(WINDOWS)" = "YES"; then \ |
2ca993e8 A |
1400 | if test ! -d $(DSTROOT)/$(winprogdir)/; then \ |
1401 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(winprogdir)/; \ | |
51004dcb | 1402 | fi; \ |
2ca993e8 A |
1403 | if test ! -d $(DSTROOT)/$(winintlibdir)/; then \ |
1404 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(winintlibdir)/; \ | |
51004dcb | 1405 | fi; \ |
2ca993e8 A |
1406 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc.lib $(DSTROOT)/$(winintlibdir)libicuuc.lib; \ |
1407 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc.pdb $(DSTROOT)/$(winprogdir)libicuuc.pdb; \ | |
1408 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuuc.dll $(DSTROOT)/$(winprogdir)libicuuc.dll; \ | |
1409 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin.lib $(DSTROOT)/$(winintlibdir)libicuin.lib; \ | |
1410 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin.pdb $(DSTROOT)/$(winprogdir)libicuin.pdb; \ | |
1411 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuin.dll $(DSTROOT)/$(winprogdir)libicuin.dll; \ | |
1412 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icudt$(ICU_VERS).dll $(DSTROOT)/$(winprogdir)icudt$(ICU_VERS).dll; \ | |
73c04bcf | 1413 | else \ |
2ca993e8 A |
1414 | if test ! -d $(DSTROOT)/$(libdir)/; then \ |
1415 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(libdir)/; \ | |
51004dcb | 1416 | fi; \ |
2ca993e8 | 1417 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(DSTROOT)/$(libdir)$(INSTALLED_DYLIB); \ |
729e4ab9 | 1418 | if test "$(LINUX)" = "YES"; then \ |
9f1b1155 A |
1419 | if test ! -d $(SYMROOT_CURRENT)/; then \ |
1420 | $(INSTALL) -d -m 0755 $(SYMROOT_CURRENT)/; \ | |
1421 | fi; \ | |
51004dcb | 1422 | cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \ |
2ca993e8 | 1423 | strip -x -S $(DSTROOT)/$(libdir)$(INSTALLED_DYLIB); \ |
729e4ab9 | 1424 | else \ |
2ca993e8 | 1425 | (cd $(DSTROOT)/$(libdir); \ |
729e4ab9 | 1426 | ln -fs $(INSTALLED_DYLIB) $(DYLIB)); \ |
51004dcb | 1427 | cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \ |
2ca993e8 A |
1428 | $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \ |
1429 | $(STRIPCMD) -x -u -r -S $(DSTROOT)/$(libdir)$(INSTALLED_DYLIB); \ | |
51004dcb | 1430 | fi; \ |
73c04bcf | 1431 | for subdir in $(EXTRA_LIBS); do \ |
2ca993e8 | 1432 | (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DSTROOT)/ $(ENV) install-library;) \ |
73c04bcf | 1433 | done; \ |
2ca993e8 A |
1434 | if test ! -d $(DSTROOT)/$(DATA_INSTALL_DIR)/; then \ |
1435 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(DATA_INSTALL_DIR)/; \ | |
51004dcb A |
1436 | fi; \ |
1437 | if test -f $(OBJROOT_CURRENT)/$(L_DATA_FILE); then \ | |
2ca993e8 A |
1438 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/$(L_DATA_FILE) $(DSTROOT)/$(DATA_INSTALL_DIR)$(L_DATA_FILE); \ |
1439 | fi; \ | |
1440 | if test -f $(OBJROOT_CURRENT)/$(TZDATA_FORMAT_FILE); then \ | |
1441 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/$(TZDATA_FORMAT_FILE) $(DSTROOT)/$(DATA_INSTALL_DIR)$(TZDATA_FORMAT_FILE); \ | |
73c04bcf | 1442 | fi; \ |
2ca993e8 A |
1443 | if test ! -d $(DSTROOT)/$(OPEN_SOURCE_VERSIONS_DIR)/; then \ |
1444 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(OPEN_SOURCE_VERSIONS_DIR)/; \ | |
73c04bcf | 1445 | fi; \ |
2ca993e8 A |
1446 | $(INSTALL) -b -m 0644 $(SRCROOT)/ICU.plist $(DSTROOT)/$(OPEN_SOURCE_VERSIONS_DIR)ICU.plist; \ |
1447 | if test ! -d $(DSTROOT)/$(OPEN_SOURCE_LICENSES_DIR)/; then \ | |
1448 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(OPEN_SOURCE_LICENSES_DIR)/; \ | |
73c04bcf | 1449 | fi; \ |
2ca993e8 | 1450 | $(INSTALL) -b -m 0644 $(SRCROOT)/LICENSE $(DSTROOT)/$(OPEN_SOURCE_LICENSES_DIR)ICU.txt; \ |
f3c0d7a5 A |
1451 | if test ! -d $(DSTROOT)/$(CLDRFILESDIR)/; then \ |
1452 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(CLDRFILESDIR)/; \ | |
1453 | fi; \ | |
1454 | $(INSTALL) -b -m 0644 $(SRCROOT)/cldrFiles/supplementalData.xml $(DSTROOT)/$(CLDRFILESDIR)/supplementalData.xml; \ | |
1455 | $(INSTALL) -b -m 0644 $(SRCROOT)/cldrFiles/plurals.xml $(DSTROOT)/$(CLDRFILESDIR)/plurals.xml; \ | |
1456 | if test ! -d $(DSTROOT)/$(EMOJI_DATA_DIR)/; then \ | |
1457 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(EMOJI_DATA_DIR)/; \ | |
1458 | fi; \ | |
1459 | $(INSTALL) -b -m 0644 $(SRCROOT)/emojiData/charClasses.txt $(DSTROOT)/$(EMOJI_DATA_DIR)/charClasses.txt; \ | |
1460 | $(INSTALL) -b -m 0644 $(SRCROOT)/emojiData/lineClasses.txt $(DSTROOT)/$(EMOJI_DATA_DIR)/lineClasses.txt; \ | |
2ca993e8 A |
1461 | if test "$(LINUX)" != "YES"; then \ |
1462 | if test ! -d $(DSTROOT)/$(localtooldir)/; then \ | |
1463 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(localtooldir)/; \ | |
51004dcb | 1464 | fi; \ |
2ca993e8 A |
1465 | if test -f $(OBJROOT_CURRENT)/$(INFOTOOL); then \ |
1466 | echo '# install' $(INFOTOOL) 'to' $(DSTROOT)/$(localtooldir)$(INFOTOOL) ; \ | |
1467 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INFOTOOL) $(DSTROOT)/$(localtooldir)$(INFOTOOL); \ | |
57a6839d | 1468 | cp $(OBJROOT_CURRENT)/$(INFOTOOL) $(SYMROOT_CURRENT)/$(INFOTOOL); \ |
2ca993e8 A |
1469 | $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(INFOTOOL)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(INFOTOOL); \ |
1470 | fi; \ | |
1471 | if test ! -d $(DSTROOT)/$(locallibdir)/; then \ | |
1472 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(locallibdir)/; \ | |
1473 | fi; \ | |
1474 | if test -f $(OBJROOT_CURRENT)/$(TOOLS_DYLIB); then \ | |
1475 | echo '# install' $(TOOLS_DYLIB) 'to' $(DSTROOT)/$(locallibdir)$(TOOLS_DYLIB) ; \ | |
1476 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(TOOLS_DYLIB) $(DSTROOT)/$(locallibdir)$(TOOLS_DYLIB); \ | |
1477 | cp $(OBJROOT_CURRENT)/$(TOOLS_DYLIB) $(SYMROOT_CURRENT)/$(TOOLS_DYLIB); \ | |
1478 | $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(TOOLS_DYLIB)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(TOOLS_DYLIB); \ | |
1479 | fi; \ | |
1480 | if test -f $(OBJROOT_CURRENT)/$(ICUZDUMPTOOL); then \ | |
1481 | echo '# install' $(ICUZDUMPTOOL) 'to' $(DSTROOT)/$(localtooldir)$(ICUZDUMPTOOL) ; \ | |
1482 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(ICUZDUMPTOOL) $(DSTROOT)/$(localtooldir)$(ICUZDUMPTOOL); \ | |
1483 | cp $(OBJROOT_CURRENT)/$(ICUZDUMPTOOL) $(SYMROOT_CURRENT)/$(ICUZDUMPTOOL); \ | |
1484 | $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(ICUZDUMPTOOL)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(ICUZDUMPTOOL); \ | |
57a6839d | 1485 | fi; \ |
729e4ab9 | 1486 | fi; \ |
b75a7d8f | 1487 | fi; |
73c04bcf A |
1488 | |
1489 | DEPEND_install_debug = debug | |
1490 | DEPEND_install_profile = profile | |
2ca993e8 | 1491 | |
73c04bcf A |
1492 | .SECONDEXPANSION: |
1493 | install_debug install_profile : $$(DEPEND_$$@) | |
73c04bcf | 1494 | if test "$(WINDOWS)" = "YES"; then \ |
2ca993e8 A |
1495 | if test ! -d $(DSTROOT)/$(winprogdir)/; then \ |
1496 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(winprogdir)/; \ | |
73c04bcf | 1497 | fi; \ |
2ca993e8 A |
1498 | if test ! -d $(DSTROOT)/$(winintlibdir)/; then \ |
1499 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(winintlibdir)/; \ | |
51004dcb | 1500 | fi; \ |
2ca993e8 A |
1501 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).lib $(DSTROOT)/$(winintlibdir)libicuuc_$(DEPEND_$@).lib; \ |
1502 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).pdb $(DSTROOT)/$(winprogdir)libicuuc_$(DEPEND_$@).pdb; \ | |
1503 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).dll $(DSTROOT)/$(winprogdir)libicuuc_$(DEPEND_$@).dll; \ | |
1504 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).lib $(DSTROOT)/$(winintlibdir)libicuin_$(DEPEND_$@).lib; \ | |
1505 | $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).pdb $(DSTROOT)/$(winprogdir)libicuin_$(DEPEND_$@).pdb; \ | |
1506 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).dll $(DSTROOT)/$(winprogdir)libicuin_$(DEPEND_$@).dll; \ | |
73c04bcf | 1507 | else \ |
2ca993e8 A |
1508 | if test ! -d $(DSTROOT)/$(libdir)/; then \ |
1509 | $(INSTALL) -d -m 0755 $(DSTROOT)/$(libdir)/; \ | |
51004dcb | 1510 | fi; \ |
2ca993e8 | 1511 | $(INSTALL) -b -m 0664 $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(DSTROOT)/$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
729e4ab9 | 1512 | if test "$(LINUX)" = "YES"; then \ |
9f1b1155 A |
1513 | if test ! -d $(SYMROOT_CURRENT)/; then \ |
1514 | $(INSTALL) -d -m 0755 $(SYMROOT_CURRENT)/; \ | |
1515 | fi; \ | |
51004dcb | 1516 | cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
2ca993e8 | 1517 | strip -x -S $(DSTROOT)/$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
729e4ab9 | 1518 | else \ |
2ca993e8 | 1519 | (cd $(DSTROOT)/$(libdir); \ |
729e4ab9 | 1520 | ln -fs $($(INSTALLED_DYLIB_$(DEPEND_$@))) $($(DYLIB_$(DEPEND_$@)))); \ |
51004dcb | 1521 | cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
2ca993e8 | 1522 | $(STRIPCMD) -x -u -r -S $(DSTROOT)/$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
51004dcb | 1523 | fi; \ |
73c04bcf | 1524 | for subdir in $(EXTRA_LIBS); do \ |
2ca993e8 | 1525 | (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DSTROOT)/ $(ENV) install-library;) \ |
73c04bcf | 1526 | done; \ |
b75a7d8f | 1527 | fi; |
b75a7d8f | 1528 | |
374ca955 A |
1529 | clean : |
1530 | -rm -rf $(OBJROOT) | |
73c04bcf | 1531 | |
2ca993e8 A |
1532 | # For the install-icutztoolsforsdk target, SDKROOT will always be an OSX SDK root |
1533 | install-icutztoolsforsdk : icutztoolsforsdk | |
1534 | if test ! -d $(DSTROOT)$(localtooldir)/; then \ | |
1535 | $(INSTALL) -d -m 0755 $(DSTROOT)$(localtooldir)/; \ | |
1536 | fi; | |
1537 | if test ! -d $(DSTROOT)$(locallibdir)/; then \ | |
1538 | $(INSTALL) -d -m 0755 $(DSTROOT)$(locallibdir)/; \ | |
1539 | fi; | |
a62d09fc A |
1540 | if test -f $(OBJROOT_CURRENT)/$(TOOLS_DYLIB_FORTOOLS); then \ |
1541 | echo '# install' $(TOOLS_DYLIB_FORTOOLS) 'to' $(DSTROOT)$(locallibdir)$(TOOLS_DYLIB_FORTOOLS) ; \ | |
1542 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(TOOLS_DYLIB_FORTOOLS) $(DSTROOT)$(locallibdir)$(TOOLS_DYLIB_FORTOOLS); \ | |
2ca993e8 A |
1543 | fi; |
1544 | if test -f $(OBJROOT_CURRENT)/$(ZICTOOL); then \ | |
1545 | echo '# install' $(ZICTOOL) 'to' $(DSTROOT)$(localtooldir)$(ZICTOOL) ; \ | |
1546 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(ZICTOOL) $(DSTROOT)$(localtooldir)$(ZICTOOL); \ | |
1547 | fi; | |
1548 | if test -f $(OBJROOT_CURRENT)/$(RESTOOL); then \ | |
1549 | echo '# install' $(RESTOOL) 'to' $(DSTROOT)$(localtooldir)$(RESTOOL) ; \ | |
1550 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(RESTOOL) $(DSTROOT)$(localtooldir)$(RESTOOL); \ | |
1551 | fi; | |
1552 | if test -f $(OBJROOT_CURRENT)/$(PKGTOOL); then \ | |
1553 | echo '# install' $(PKGTOOL) 'to' $(DSTROOT)$(localtooldir)$(PKGTOOL) ; \ | |
1554 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(PKGTOOL) $(DSTROOT)$(localtooldir)$(PKGTOOL); \ | |
1555 | fi; | |
1556 | if test -f $(OBJROOT_CURRENT)/$(TZ2ICUTOOL); then \ | |
1557 | echo '# install' $(TZ2ICUTOOL) 'to' $(DSTROOT)$(localtooldir)$(TZ2ICUTOOL) ; \ | |
1558 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(TZ2ICUTOOL) $(DSTROOT)$(localtooldir)$(TZ2ICUTOOL); \ | |
1559 | fi; | |
a62d09fc A |
1560 | if test -f $(OBJROOT_CURRENT)/$(GENBRKTOOL); then \ |
1561 | echo '# install' $(GENBRKTOOL) 'to' $(DSTROOT)$(localtooldir)$(GENBRKTOOL) ; \ | |
1562 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(GENBRKTOOL) $(DSTROOT)$(localtooldir)$(GENBRKTOOL); \ | |
1563 | fi; |