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