2 # Wrapper makefile for ICU
3 # Copyright (C) 2003-2015 Apple Inc. All rights reserved.
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.
8 #################################
9 # Notes on building for AAS using Windows (7) + Visual Studio (2010) + Cygwin:
11 # Either this should be run indirectly from the VS command prompt via the
12 # BuildICUForAAS script or project, using the instructions there (which build
13 # both 32-bit and 64-bit), or it should be run from within Cygwin using the
14 # following instructions or equivalent (different steps for 32-bit or 64-bit):
16 # 1. From VS command prompt, run vcvarsall.bat to set various environment variables.
18 # > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
20 # > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
22 # 2. Launch Cygwin, e.g.
23 # > C:\cygwin\Cygwin.bat
25 # 3. Within cygwin, cd to the top level of the ICU sources directory, e.g.
28 # 4. Adjust the PATH to put the appropriate VC tools directory first:
30 # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/":$PATH
32 # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/":$PATH
34 # 5. Run the ICU makefile
36 # make [install] WINDOWS=YES [ARCH64=NO] [DSTROOT=...]
38 # make [install] WINDOWS=YES ARCH64=YES [DSTROOT=...]
40 #################################
42 #################################
43 #################################
45 #################################
46 #################################
48 # ':=' denotes a "simply expanded" variable. It's value is
49 # set at the time of definition and it never recursively expands
50 # when used. This is in contrast to using '=' which denotes a
51 # recursively expanded variable.
53 # Sane defaults, which are typically overridden on the command line.
58 # chicken and egg problem: we can't use cygpath until PATH & SHELL are set,
59 # but we have to convert VS100VCTOOLS_PATH in order to set PATH. So instead we
60 # convert using subst.
61 ifeq "$(WINDOWS)" "YES"
62 ifneq "$(VS100VCTOOLS_PATH)" ""
63 VS100VCTOOLS_CYGPATH:= /cygdrive/$(subst :/,/,$(subst \,/,$(VS100VCTOOLS_PATH)))
64 PATH:=$(VS100VCTOOLS_CYGPATH):/usr/local/bin/:/usr/bin/:$(PATH)
67 $(info # PATH=$(PATH))
69 # For some reason, cygwin bash (at least when run non-login) needs to use
70 # bash for pwd, echo etc. (but uname does not work, see below)
71 ifeq "$(WINDOWS)" "YES"
77 # if building for windows from batch script, convert Win-style paths
78 # for SRCROOT etc. to cygwin-style paths. Don't define them if not
80 ifeq "$(WINDOWS)" "YES"
81 ifneq "$(VS100VCTOOLS_PATH)" ""
83 SRCROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SRCROOT)))
86 OBJROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(OBJROOT)))
89 DSTROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(DSTROOT)))
92 SYMROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SYMROOT)))
101 OBJROOT:=$(SRCROOT)/build
110 ifeq "$(WINDOWS)" "YES"
111 ifeq "$(ARCH64)" "YES"
112 OBJROOT_CURRENT=$(OBJROOT)/obj64
113 SYMROOT_CURRENT=$(SYMROOT)/obj64
115 OBJROOT_CURRENT=$(OBJROOT)/obj32
116 SYMROOT_CURRENT=$(SYMROOT)/obj32
118 else ifeq "$(LINUX)" "YES"
119 ifeq "$(ARCH64)" "YES"
120 OBJROOT_CURRENT=$(OBJROOT)/obj64
121 SYMROOT_CURRENT=$(SYMROOT)/obj64
123 OBJROOT_CURRENT=$(OBJROOT)/obj32
124 SYMROOT_CURRENT=$(SYMROOT)/obj32
127 OBJROOT_CURRENT=$(OBJROOT)
128 SYMROOT_CURRENT=$(SYMROOT)
130 CROSSHOST_OBJROOT=$(OBJROOT)/crossbuildhost
131 APPLE_INTERNAL_DIR=/AppleInternal
133 MAC_OS_X_VERSION_MIN_REQUIRED=1090
134 OSX_HOST_VERSION_MIN_STRING=10.9
135 ifndef IPHONEOS_DEPLOYMENT_TARGET
136 IOS_VERSION_TARGET_STRING=9.0
137 else ifeq "$(IPHONEOS_DEPLOYMENT_TARGET)" ""
138 IOS_VERSION_TARGET_STRING=9.0
140 IOS_VERSION_TARGET_STRING=$(IPHONEOS_DEPLOYMENT_TARGET)
142 ifndef MACOSX_DEPLOYMENT_TARGET
143 OSX_VERSION_TARGET_STRING=10.11
144 else ifeq "$(MACOSX_DEPLOYMENT_TARGET)" ""
145 OSX_VERSION_TARGET_STRING=10.11
147 OSX_VERSION_TARGET_STRING=$(MACOSX_DEPLOYMENT_TARGET)
149 ifndef WATCHOS_DEPLOYMENT_TARGET
150 WATCHOS_VERSION_TARGET_STRING=2.0
151 else ifeq "$(WATCHOS_DEPLOYMENT_TARGET)" ""
152 WATCHOS_VERSION_TARGET_STRING=2.0
154 WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_DEPLOYMENT_TARGET)
156 ifndef TVOS_DEPLOYMENT_TARGET
157 TVOS_VERSION_TARGET_STRING=9.0
158 else ifeq "$(TVOS_DEPLOYMENT_TARGET)" ""
159 TVOS_VERSION_TARGET_STRING=9.0
161 TVOS_VERSION_TARGET_STRING=$(TVOS_DEPLOYMENT_TARGET)
164 $(info # SRCROOT=$(SRCROOT))
165 $(info # DSTROOT=$(DSTROOT))
166 $(info # OBJROOT=$(OBJROOT))
167 $(info # IOS_VERSION_TARGET_STRING=$(IOS_VERSION_TARGET_STRING))
168 $(info # OSX_VERSION_TARGET_STRING=$(OSX_VERSION_TARGET_STRING))
169 $(info # WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_VERSION_TARGET_STRING))
170 $(info # TVOS_VERSION_TARGET_STRING=$(TVOS_VERSION_TARGET_STRING))
172 # For some reason, under cygwin, bash uname is not found, and
173 # sh uname does not produce a result with -p or -m. So we just
175 ifeq "$(WINDOWS)" "YES"
176 UNAME_PROCESSOR:=i386
178 UNAME_PROCESSOR:=$(shell uname -p)
181 # The following is a holdover from use of Makefile.indigo;
182 # should just change to use DSTROOT everywhere instead of DEST_ROOT
183 DEST_ROOT=$(DSTROOT)/
187 else ifeq "$(SDKROOT)" ""
190 SDKPATH:=$(shell xcodebuild -version -sdk $(SDKROOT) Path)
195 ifneq "$(RC_ARCHS)" ""
196 ifneq "$(filter arm armv6 armv7 armv7s arm64,$(RC_ARCHS))" ""
199 else ifeq "$(RC_INDIGO)" "YES"
206 INSTALLHDRS_ARCH=-arch $(shell echo $(RC_ARCHS) | cut -d' ' -f1)
212 $(info # RC_ARCHS=$(RC_ARCHS))
213 $(info # INSTALLHDRS_ARCH=$(INSTALLHDRS_ARCH))
214 $(info # buildhost=$(UNAME_PROCESSOR))
215 $(info # SDKROOT=$(SDKROOT))
216 $(info # SDKPATH=$(SDKPATH))
217 $(info # RC_INDIGO=$(RC_INDIGO))
218 $(info # CROSS_BUILD=$(CROSS_BUILD))
219 $(info # BUILD_TYPE=$(BUILD_TYPE))
220 $(info # DEST_ROOT=$(DEST_ROOT))
223 # FORCEENDIAN below is to override silly configure behavior in which if
224 # __APPLE_CC__ is defined and archs are in { ppc, ppc64, i386, x86_64 }
225 # then it assumes a universal build (ac_cv_c_bigendian=universal) with
226 # data file initially built big-endian.
228 ifeq "$(CROSS_BUILD)" "YES"
229 RC_ARCHS_FIRST=$(shell echo $(RC_ARCHS) | cut -d' ' -f1)
230 TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin14.0.0
231 ENV_CONFIGURE_ARCHS=-arch $(RC_ARCHS_FIRST)
232 ICUPKGTOOLIBS="$(CROSSHOST_OBJROOT)/lib:$(CROSSHOST_OBJROOT)/stubdata"
233 ICUPKGTOOL=$(CROSSHOST_OBJROOT)/bin/icupkg
234 ifeq "$(filter-out i386 x86_64,$(RC_ARCHS))" ""
235 FORCEENDIAN= ac_cv_c_bigendian=no
239 else ifeq "$(LINUX)" "YES"
240 TARGET_SPEC=$(UNAME_PROCESSOR)-unknown-linux-gnu
242 ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata"
243 ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg
246 TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin14.0.0
248 ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata"
249 ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg
252 $(info # TARGET_SPEC=$(TARGET_SPEC))
253 $(info # ENV_CONFIGURE_ARCHS=$(ENV_CONFIGURE_ARCHS))
255 ICU_TARGET_VERSION_FOR_TZ_EXTRA :=
256 ifeq "$(BUILD_TYPE)" "SIMULATOR"
257 ICU_TARGET_VERSION_FOR_TZ_EXTRA := -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING)
260 ifeq "$(BUILD_TYPE)" "DEVICE"
266 # even for a crossbuild host build, we want to use the target's latest tzdata as pointed to by latest_tzdata.tar.gz
267 ifeq "$(shell test -d $(SDKPATH)/usr/local/share/tz && echo YES )" "YES"
268 export TZDATA:=$(SDKPATH)/usr/local/share/tz/$(shell readlink $(SDKPATH)/usr/local/share/tz/latest_tzdata.tar.gz)
270 $(info # TZDATA=$(TZDATA))
272 ifeq "$(WINDOWS)" "YES"
277 else ifeq "$(LINUX)" "YES"
286 ifeq "$(BUILD_TYPE)" ""
287 HOSTCC := $(shell xcrun -sdk $(SDKPATH) -find cc)
288 HOSTCXX := $(shell xcrun -sdk $(SDKPATH) -find c++)
289 ifeq "$(SDKPATH)" "/"
290 ifneq (,$(findstring XcodeDefault,$(HOSTCC)))
291 HOSTSDKPATH := $(shell xcodebuild -version -sdk macosx Path)
293 HOSTSDKPATH := $(shell xcodebuild -version -sdk macosx.internal Path)
296 HOSTSDKPATH := $(SDKPATH)
298 ISYSROOT:= -isysroot $(HOSTSDKPATH)
301 NM := $(shell xcrun -find nm)
302 STRIPCMD := $(shell xcrun -find strip)
304 HOSTCC := $(shell xcrun -sdk macosx -find cc)
305 HOSTCXX := $(shell xcrun -sdk macosx -find c++)
306 HOSTSDKPATH := $(shell xcodebuild -version -sdk macosx Path)
307 ISYSROOT:= -isysroot $(SDKPATH)
308 CC := $(shell xcrun -sdk $(SDKPATH) -find cc)
309 CXX := $(shell xcrun -sdk $(SDKPATH) -find c++)
310 NM := $(shell xcrun -sdk $(SDKPATH) -find nm)
311 STRIPCMD := $(shell xcrun -sdk $(SDKPATH) -find strip)
313 HOSTISYSROOT = -isysroot $(HOSTSDKPATH)
314 EMBEDDED:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_EMBEDDED | cut -d' ' -f3)
315 WATCHOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_WATCH | cut -d' ' -f3)
316 TVOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_TV | cut -d' ' -f3)
317 SIMULATOROS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_SIMULATOR | cut -d' ' -f3)
319 DSYMTOOL := /usr/bin/dsymutil
322 $(info # HOSTCC=$(HOSTCC))
323 $(info # HOSTCXX=$(HOSTCXX))
324 $(info # HOSTISYSROOT=$(HOSTISYSROOT))
327 $(info # ISYSROOT=$(ISYSROOT))
329 ifeq "$(EMBEDDED)" "1"
330 export APPLE_EMBEDDED=YES
332 else ifeq "$(RC_INDIGO)" "YES"
333 export APPLE_EMBEDDED=YES
336 export APPLE_EMBEDDED=NO
340 ifeq "$(APPLE_EMBEDDED)" "YES"
341 ifeq "$(WATCHOS)" "1"
342 ICU_TARGET_VERSION := -mwatchos-version-min=$(WATCHOS_VERSION_TARGET_STRING)
343 else ifeq "$(TVOS)" "1"
344 ICU_TARGET_VERSION := -mtvos-version-min=$(TVOS_VERSION_TARGET_STRING)
346 ICU_TARGET_VERSION := -miphoneos-version-min=$(IOS_VERSION_TARGET_STRING)
348 else ifeq "$(SIMULATOROS)" "1"
349 ifeq "$(WATCHOS)" "1"
350 ICU_TARGET_VERSION := -mwatchos-simulator-version-min=$(WATCHOS_VERSION_TARGET_STRING)
351 else ifeq "$(TVOS)" "1"
352 ICU_TARGET_VERSION := -mtvos-simulator-version-min=$(TVOS_VERSION_TARGET_STRING)
354 ICU_TARGET_VERSION := -mios-simulator-version-min=$(IOS_VERSION_TARGET_STRING)
357 ICU_TARGET_VERSION :=
359 $(info # ICU_TARGET_VERSION=$(ICU_TARGET_VERSION))
361 ifeq "$(DISABLE_DRAFT)" "YES"
362 DRAFT_FLAG=--disable-draft
367 ifndef RC_ProjectSourceVersion
368 ifdef RC_PROJECTSOURCEVERSION
369 RC_ProjectSourceVersion=$(RC_PROJECTSOURCEVERSION)
373 # An Apple submission version (passed in RC_ProjectSourceVersion for official builds) is
375 # where X is in range 0-214747, Y and Z are in range 0-99 (with no leading zeros).
376 # The value for the SourceVersion property in version.plists will be calculated as
377 # (X*10000 + Y*100 + Z). So we want U_ICU_VERSION_BUILDLEVEL_NUM to be Y*100 + Z
378 ifneq "$(RC_ProjectSourceVersion)" ""
379 ifeq "$(WINDOWS)" "YES"
380 ICU_BUILD_Y := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\3/')
381 ICU_BUILD_Z1 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\5/')
382 ICU_BUILD_Z2 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\6/')
384 ICU_BUILD_Y := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\3/')
385 ICU_BUILD_Z1 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\5/')
386 ICU_BUILD_Z2 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\6/')
388 ifeq "$(ICU_BUILD_Y)" ""
391 ICU_BUILD := $(subst a,$(ICU_BUILD_Y),abc)
392 ifeq "$(ICU_BUILD_Z1)" ""
393 ICU_BUILD := $(subst b,0,$(ICU_BUILD))
394 ICU_BUILD := $(subst c,0,$(ICU_BUILD))
396 ifeq "$(ICU_BUILD_Z2)" ""
397 ICU_BUILD := $(subst b,0,$(ICU_BUILD))
398 ICU_BUILD := $(subst c,$(ICU_BUILD_Z1),$(ICU_BUILD))
400 ICU_BUILD := $(subst b,$(ICU_BUILD_Z1),$(ICU_BUILD))
401 ICU_BUILD := $(subst c,$(ICU_BUILD_Z2),$(ICU_BUILD))
408 $(info # ICU_BUILD=$(ICU_BUILD))
409 ifeq "$(ICU_BUILD)" "0"
412 DEFINE_BUILD_LEVEL =-DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD)
415 # Disallow $(SRCROOT) == $(OBJROOT)
416 ifeq ($(OBJROOT), $(SRCROOT))
417 $(error SRCROOT same as OBJROOT)
420 # Disallow cross builds on Windows/Linux for now
421 # (since those builds are not out-of-source as required for cross-builds)
422 ifeq "$(CROSS_BUILD)" "YES"
423 ifeq "$(WINDOWS)" "YES"
424 $(error Cross-builds currently not allowed on Windows)
426 ifeq "$(LINUX)" "YES"
427 $(error Cross-builds currently not allowed on Linux)
431 #################################
433 #################################
435 # For installhdrs. Not every compiled module has an associated header. Normally,
436 # ICU installs headers as a sub-targe of the install target. But since we only want
437 # certain libraries to install (and since we link all of our own .o modules), we need
438 # invoke the headers targets ourselves. This may be problematic because there isn't a
439 # good way to dist-clean afterwards...we need to do explicit dist-cleans, especially if
440 # install the extra libraries.
443 # EXTRA_HDRS = ./extra/ustdio/ ./layout/
444 ifeq "$(APPLE_EMBEDDED)" "YES"
445 HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS)
446 else ifeq "$(WINDOWS)" "YES"
447 HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS)
449 HDR_MAKE_SUBDIR = ./common/ ./i18n/ ./io/ $(EXTRA_HDRS)
451 ifeq "$(WINDOWS)" "YES"
452 PRIVATE_HDR_PREFIX=$(APPLE_INTERNAL_DIR)
453 else ifeq "$(APPLE_EMBEDDED)" "YES"
455 PRIVATE_HDR_PREFIX=/usr/local
457 PRIVATE_HDR_PREFIX=/usr/local
460 #################################
462 #################################
464 # For install. We currently don't install EXTRA_LIBS. We also don't install the data
465 # directly into the ICU library. It is now installed at /usr/share/icu/*.dat. Thus we
466 # don't use DATA_OBJ anymore. This could change if we decide to move the data back into
467 # the icucore monolithic library.
469 INSTALL = /usr/bin/install
470 COMMON_OBJ = ./common/*.o
471 I18N_OBJ = ./i18n/*.o
473 STUB_DATA_OBJ = ./stubdata/*.o
475 #EXTRA_LIBS =./extra/ ./layout/ ./tools/ctestfw/ ./tools/toolutil/
476 #DATA_OBJ = ./data/out/build/*.o
477 ifeq "$(APPLE_EMBEDDED)" "YES"
478 DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(STUB_DATA_OBJ)
479 else ifeq "$(WINDOWS)" "YES"
480 DYLIB_OBJS=$(COMMON_OBJ) ./common/common.res $(I18N_OBJ) $(STUB_DATA_OBJ)
482 DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(IO_OBJ) $(STUB_DATA_OBJ)
485 #################################
487 #################################
489 # For installsrc (B&I)
490 # Note that installsrc is run on the system from which ICU is submitted, which
491 # may be a different environment than the one for a which a build is targeted.
493 INSTALLSRC_VARFILES=./ICU_embedded.order \
494 ./minimalapis.txt ./minimalapisTest.c ./minimalpatchconfig.txt ./windowspatchconfig.txt ./patchconfig.txt ./crosshostpatchconfig.txt \
495 BuildICUForAAS_script.bat EXPORT.APPLE
497 #################################
499 #################################
501 #We need to clean after installing.
505 # Some directories aren't cleaned recursively. Clean them manually...
506 MANUAL_CLEAN_TOOLS = ./tools/dumpce
507 MANUAL_CLEAN_EXTRA = ./extra/scrptrun ./samples/layout ./extra/ustdio ./extra
508 MANUAL_CLEAN_TEST = ./test/collperf ./test/iotest ./test/letest ./test/thaitest ./test/threadtest ./test/testmap ./test
509 MANUAL_CLEAN_SAMPLE = ./samples/layout ./samples
511 CLEAN_SUBDIR = ./stubdata ./common ./i18n ./io ./layout ./layoutex ./data ./tools ./$(MANUAL_CLEAN_TOOLS) $(MANUAL_CLEAN_EXTRA) $(MANUAL_CLEAN_TEST) $(MANUAL_CLEAN_SAMPLE)
513 #################################
515 #################################
517 ifeq "$(WINDOWS)" "YES"
518 ifeq "$(ARCH64)" "YES"
519 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \
520 --with-data-packaging=library --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=64 \
523 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \
524 --with-data-packaging=library --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \
527 else ifeq "$(LINUX)" "YES"
528 ifeq "$(ARCH64)" "YES"
529 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \
530 --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=64 \
533 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \
534 --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \
537 else ifeq "$(APPLE_EMBEDDED)" "YES"
538 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \
539 --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \
542 CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \
543 --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \
547 #################################
549 #################################
551 # This may or may not be an appropriate name for the icu dylib. This naming scheme is
552 # an attempt to follow the icu convention in naming the dylib and then having symbolic
553 # links of easier to remember library names point it it. *UPDATE* the version and
554 # sub-version variables as needed. The Core version should be 'A' until the core
555 # version changes it's API...that is a new version isn't backwards compatible.
556 # The ICU version/subversion should reflect the actual ICU version.
563 ifeq "$(WINDOWS)" "YES"
565 ifeq "$(ARCH64)" "YES"
566 winprogdir = /Program\ Files/Common\ Files/Apple/Apple\ Application\ Support/
567 winintlibdir = /AppleInternal/lib64/
569 winprogdir = /Program\ Files\ \(x86\)/Common\ Files/Apple/Apple\ Application\ Support/
570 winintlibdir = /AppleInternal/lib32/
573 else ifeq "$(LINUX)" "YES"
575 ifeq "$(ARCH64)" "YES"
589 DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF)
590 DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF)
591 DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF)
592 ifeq "$(WINDOWS)" "YES"
593 INSTALLED_DYLIB = $(LIB_NAME).$(DYLIB_SUFF)
594 INSTALLED_DYLIB_DEBUG = $(LIB_NAME)_debug.$(DYLIB_SUFF)
595 INSTALLED_DYLIB_PROFILE = $(LIB_NAME)_profile.$(DYLIB_SUFF)
596 else ifeq "$(LINUX)" "YES"
597 INSTALLED_DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF)
598 INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF)
599 INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF)
601 INSTALLED_DYLIB = lib$(LIB_NAME).$(CORE_VERS).$(DYLIB_SUFF)
602 INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME).$(CORE_VERS)_debug.$(DYLIB_SUFF)
603 INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME).$(CORE_VERS)_profile.$(DYLIB_SUFF)
606 INSTALLED_DYLIB_icu = INSTALLED_DYLIB
607 INSTALLED_DYLIB_debug = INSTALLED_DYLIB_DEBUG
608 INSTALLED_DYLIB_profile = INSTALLED_DYLIB_PROFILE
610 DYLIB_debug = DYLIB_DEBUG
611 DYLIB_profile = DYLIB_PROFILE
613 #################################
615 #################################
617 OPEN_SOURCE_VERSIONS_DIR=/usr/local/OpenSourceVersions/
618 OPEN_SOURCE_LICENSES_DIR=/usr/local/OpenSourceLicenses/
620 B_DATA_FILE=icudt$(ICU_VERS)b.dat
621 L_DATA_FILE=icudt$(ICU_VERS)l.dat
622 DATA_BUILD_SUBDIR= data/out
623 DATA_INSTALL_DIR=/usr/share/icu/
624 # DATA_LOOKUP_DIR is what the target ICU_DATA_DIR gets set to in CFLAGS, CXXFLAGS;
625 # DATA_LOOKUP_DIR_BUILDHOST is what any crossbuild host ICU_DATA_DIR gets set to.
626 ifneq "$(APPLE_EMBEDDED)" "YES"
627 DATA_LOOKUP_DIR=/usr/share/icu/
629 ifeq "$(RC_INDIGO)" "YES"
630 DATA_LOOKUP_DIR=/usr/share/icu/
632 DATA_LOOKUP_DIR=/var/db/icu/
635 DATA_LOOKUP_DIR_BUILDHOST=/usr/share/icu/
637 # Name of runtime environment variable to get the prefix path for DATA_LOOKUP_DIR
638 # Currently we are only using this for LINUX, should also use for iOS simulator
639 ifeq "$(LINUX)" "YES"
640 DATA_DIR_PREFIX_ENV_VAR=APPLE_FRAMEWORKS_ROOT
642 DATA_DIR_PREFIX_ENV_VAR=
645 #################################
647 #################################
649 localtooldir=/usr/local/bin/
653 INFOTOOL_OBJS = ./tools/icuinfo/icuinfo.o ./tools/toolutil/udbgutil.o ./tools/toolutil/uoptions.o
655 #################################
657 # e.g. supplementalData.xml, per <rdar://problem/13426014>
658 # These are like internal headers in that they are only installed for
659 # (other) projects to build against, not needed at runtime.
660 # Therefore install during installhdrs.
661 #################################
663 CLDRFILESDIR=/usr/local/share/cldr
665 #################################
666 # Environment variables
667 #################################
669 # $(RC_ARCHS:%=-arch %) is a substitution reference. It denotes, in this case,
670 # for every value <val> in RC_ARCHS, replace it with "-arch <val>". Substitution
671 # references have the form $(var:a=b). We can insert the strip and prebinding commands
672 # into CFLAGS (and CXXFLAGS). This controls a lot of the external variables so we don't
673 # need to directly modify the ICU files (like for CFLAGS, etc).
675 LIBOVERRIDES=LIBICUDT="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \
676 LIBICUUC="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \
677 LIBICUI18N="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)"
679 # For normal Windows builds set the ENV= options here; for debug Windows builds set the ENV_DEBUG=
680 # options here and also the update the LINK.EXE lines in the TARGETS section below.
681 ifeq "$(WINDOWS)" "YES"
682 ifeq "$(ARCH64)" "YES"
683 ENV= CFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
684 CXXFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" \
685 LDFLAGS="/NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF"
687 ENV= CFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
688 CXXFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" \
689 LDFLAGS="/NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF"
691 ENV_CONFIGURE= CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \
692 CFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
693 CXXFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t"
694 ENV_DEBUG= CFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
695 CXXFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc" \
696 LDFLAGS="/DEBUG /DYNAMICBASE"
698 else ifeq "$(LINUX)" "YES"
699 ifeq "$(ARCH64)" "YES"
700 ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
701 CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \
704 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" \
705 CXXFLAGS="-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" \
707 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64"
709 ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
712 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" \
713 CXXFLAGS="-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" \
715 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64"
717 ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
720 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" \
721 CXXFLAGS="-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" \
723 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64"
725 ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
728 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" \
729 CXXFLAGS="-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" \
731 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64"
733 ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
734 CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \
737 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" \
738 CXXFLAGS="-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" \
740 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
742 ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
745 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" \
746 CXXFLAGS="-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" \
748 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
750 ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
753 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" \
754 CXXFLAGS="-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" \
756 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
758 ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
761 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" \
762 CXXFLAGS="-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" \
764 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
768 ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
769 CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(ISYSROOT) $(ENV_CONFIGURE_ARCHS)" \
772 CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
773 CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
774 RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\
776 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
778 ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
781 CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
782 CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
783 RC_ARCHS="$(RC_ARCHS)" \
785 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
787 ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
790 CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
791 CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
792 RC_ARCHS="$(RC_ARCHS)" \
794 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
796 ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
799 CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
800 CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
801 RC_ARCHS="$(RC_ARCHS)" \
803 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
805 ENV_CONFIGURE_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
806 CPPFLAGS="$(DEFINE_BUILD_LEVEL) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(HOSTISYSROOT)" \
809 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" \
810 CXXFLAGS="-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" \
812 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
814 ENV_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
817 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" \
818 CXXFLAGS="-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" \
820 DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib"
825 ENV_debug = ENV_DEBUG
826 ENV_profile = ENV_PROFILE
828 ifeq "$(BUILD_TYPE)" "DEVICE"
829 ORDERFILE=$(SDKPATH)/AppleInternal/OrderFiles/libicucore.order
830 else ifeq "$(APPLE_EMBEDDED)" "YES"
831 ORDERFILE=$(SRCROOT)/ICU_embedded.order
833 ORDERFILE=/usr/local/lib/OrderFiles/libicucore.order
835 ifeq "$(shell test -f $(ORDERFILE) && echo YES )" "YES"
836 SECTORDER_FLAGS=-sectorder __TEXT __text $(ORDERFILE)
842 #################################
843 #################################
845 #################################
846 #################################
848 .PHONY : icu check installsrc installhdrs installhdrsint clean install debug debug-install crossbuildhost
851 icu debug profile : $(OBJROOT_CURRENT)/Makefile
852 echo "# make for target";
853 (cd $(OBJROOT_CURRENT); \
854 $(MAKE) $($(ENV_$@)); \
855 if test "$(WINDOWS)" = "YES"; then \
857 rc.exe /folibicuuc.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
858 "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 libicuuc.rc; \
861 rc.exe /folibicuin.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common libicuin.rc; \
863 if test "$@" = "debug"; then \
865 LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a800000" /DYNAMICBASE /DEBUG \
866 /IMPLIB:../lib/libicuuc_$@.lib /out:../lib/libicuuc_$@.dll \
867 *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \
870 LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a900000" /DYNAMICBASE /DEBUG \
871 /IMPLIB:../lib/libicuin_$@.lib /out:../lib/libicuin_$@.dll \
872 *.o libicuin.res ../lib/libicuuc_$@.lib ../stubdata/icudt.lib advapi32.lib; \
876 rm -f ../lib/libicuuc.dll.manifest; \
877 if test "$(ARCH64)" = "YES"; then \
878 LINK.EXE /DLL /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
879 /IMPLIB:../lib/libicuuc.lib /out:../lib/libicuuc.dll \
880 *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \
882 LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
883 /IMPLIB:../lib/libicuuc.lib /out:../lib/libicuuc.dll \
884 *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \
886 mt.exe -nologo -manifest ../lib/libicuuc.dll.manifest -outputresource:"../lib/libicuuc.dll;2"; \
889 rm -f ../lib/libicuin.dll.manifest; \
890 if test "$(ARCH64)" = "YES"; then \
891 LINK.EXE /DLL /NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
892 /IMPLIB:../lib/libicuin.lib /out:../lib/libicuin.dll \
893 *.o libicuin.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \
895 LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
896 /IMPLIB:../lib/libicuin.lib /out:../lib/libicuin.dll \
897 *.o libicuin.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \
899 mt.exe -nologo -manifest ../lib/libicuin.dll.manifest -outputresource:"../lib/libicuin.dll;2"; \
901 if test "$(ARCH64)" != "YES"; then \
904 rm -f icuuc40shim.o; \
905 rm -f ../lib/icuuc40.dll.manifest; \
906 cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \
907 -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
908 -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_COMMON_IMPLEMENTATION \
909 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \
910 /c /Foicuuc40shim.o icuuc40shim.cpp; \
911 rc.exe /foicuuc40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
912 "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuuc40shim.rc; \
913 LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
914 /IMPLIB:../lib/shim/icuuc.lib /out:../lib/icuuc40.dll \
915 icuuc40shim.o icuuc40shim.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \
916 mt.exe -nologo -manifest ../lib/icuuc40.dll.manifest -outputresource:"../lib/icuuc40.dll;2"; \
919 rm -f icuin40shim.o; \
920 rm -f ../lib/icuin40.dll.manifest; \
921 cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \
922 -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \
923 -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_I18N_IMPLEMENTATION \
924 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \
925 /c /Foicuin40shim.o icuin40shim.cpp; \
926 rc.exe /foicuin40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \
927 "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuin40shim.rc; \
928 LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
929 /IMPLIB:../lib/shim/icuin.lib /out:../lib/icuin40.dll \
930 icuin40shim.o icuin40shim.res ../lib/libicuin.lib ../stubdata/icudt.lib advapi32.lib; \
931 mt.exe -nologo -manifest ../lib/icuin40.dll.manifest -outputresource:"../lib/icuin40.dll;2"; \
936 if test "$(LINUX)" = "YES"; then \
937 if test "$(ARCH64)" = "YES"; then \
938 $($(ENV_$@)) $(CXX) \
939 -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \
940 $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -Wl,-L/usr/lib64/ -ldl \
941 -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \
943 $($(ENV_$@)) $(CXX) \
944 -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \
945 $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -ldl \
946 -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \
949 tmpfile=`mktemp -t weakexternal.XXXXXX` || exit 1; \
950 $(NM) -m $(RC_ARCHS:%=-arch %) $(DYLIB_OBJS) | fgrep "weak external" | fgrep -v "undefined" | sed -e 's/.*weak external[^_]*//' | sort | uniq | cat >$$tmpfile; \
951 $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \
952 $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \
953 $(CXXFLAGS) $(LDFLAGS) -single_module $(SECTORDER_FLAGS) -unexported_symbols_list $$tmpfile -dead_strip \
954 -install_name $(libdir)$($(INSTALLED_DYLIB_$@)) -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \
955 if test "$@" = "icu"; then \
956 ln -fs $(INSTALLED_DYLIB) $(DYLIB); \
957 $($(ENV_$@)) $(CXX) $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \
958 $(LDFLAGS) -dead_strip -o ./$(INFOTOOL) $(INFOTOOL_OBJS) -L./ -l$(LIB_NAME) ; \
961 if test -f ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); then \
962 ln -fs ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); \
964 if test -f ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); then \
965 ln -fs ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); \
967 DYLD_LIBRARY_PATH=$(ICUPKGTOOLIBS) \
968 $(ICUPKGTOOL) -tl ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE) $(L_DATA_FILE); \
973 crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile
974 echo "# make for crossbuild host";
975 (cd $(CROSSHOST_OBJROOT); \
976 $(MAKE) $($(ENV_BUILDHOST)); \
980 ifneq "$(CROSS_BUILD)" "YES"
981 (cd $(OBJROOT_CURRENT); \
982 ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV) check; \
985 $(warning check not supported for cross-build)
989 ifneq "$(CROSS_BUILD)" "YES"
990 (cd $(OBJROOT_CURRENT); \
991 ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV_DEBUG) check; \
994 $(warning check not supported for cross-build)
998 (cd $(OBJROOT_CURRENT)/samples; \
999 $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \
1003 (cd $(OBJROOT_CURRENT)/extra; \
1004 $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \
1007 ifneq "$(CROSS_BUILD)" "YES"
1008 $(OBJROOT_CURRENT)/Makefile :
1010 $(OBJROOT_CURRENT)/Makefile : crossbuildhost
1012 if test ! -d $(OBJROOT_CURRENT); then \
1013 mkdir -p $(OBJROOT_CURRENT); \
1015 cp -Rpf $(SRCROOT)/icuSources/* $(OBJROOT_CURRENT)/;
1016 if test "$(WINDOWS)" = "YES"; then \
1017 echo "# configure for target"; \
1018 (cd $(OBJROOT_CURRENT)/data/unidata; mv base_unidata/*.txt .;); \
1019 (cd $(OBJROOT_CURRENT)/data/unidata/norm2; mv base_norm2/*.txt .;); \
1020 (cd $(OBJROOT_CURRENT)/data/in; mv base_in/*.nrm .; mv base_in/*.icu .;); \
1021 (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./runConfigureICU Cygwin/MSVC $(CONFIG_FLAGS);) \
1022 elif test "$(LINUX)" = "YES"; then \
1023 echo "# configure for target"; \
1024 (cd $(OBJROOT_CURRENT)/data/unidata; mv base_unidata/*.txt .;); \
1025 (cd $(OBJROOT_CURRENT)/data/unidata/norm2; mv base_norm2/*.txt .;); \
1026 (cd $(OBJROOT_CURRENT)/data/in; mv base_in/*.nrm .; mv base_in/*.icu .;); \
1027 (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./runConfigureICU Linux $(CONFIG_FLAGS);) \
1028 elif test "$(CROSS_BUILD)" = "YES"; then \
1029 echo "# configure for crossbuild target"; \
1030 (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./configure --host=$(TARGET_SPEC) --with-cross-build=$(CROSSHOST_OBJROOT) $(CONFIG_FLAGS);) \
1032 echo "# configure for non-crossbuild target"; \
1033 (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./runConfigureICU MacOSX $(CONFIG_FLAGS);) \
1035 if test "$(APPLE_EMBEDDED)" = "YES"; then \
1036 (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/minimalpatchconfig.txt;) \
1037 elif test "$(WINDOWS)" = "YES"; then \
1038 (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/windowspatchconfig.txt;) \
1040 (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/patchconfig.txt;) \
1043 # for the tools that build the data file, cannot set UDATA_DEFAULT_ACCESS = UDATA_ONLY_PACKAGES
1044 # as minimalpatchconfig.txt does; need different patches for the host build.
1045 $(CROSSHOST_OBJROOT)/Makefile :
1046 if test ! -d $(CROSSHOST_OBJROOT); then \
1047 mkdir -p $(CROSSHOST_OBJROOT); \
1049 cp -Rpf $(SRCROOT)/icuSources/* $(CROSSHOST_OBJROOT);
1050 echo "# configure for crossbuild host";
1051 (cd $(CROSSHOST_OBJROOT); $(ENV_CONFIGURE_BUILDHOST) ./runConfigureICU MacOSX $(CONFIG_FLAGS);)
1052 (cd $(CROSSHOST_OBJROOT)/common/unicode/; patch <$(SRCROOT)/crosshostpatchconfig.txt;)
1054 #################################
1056 #################################
1058 # Since our sources are in icuSources (ignore the ICU subdirectory for now), we wish to
1059 # copy them to somewhere else. We tar it to stdout, cd to the appropriate directory, and
1060 # untar from stdin. We then look for all the CVS directories and remove them. We may have
1061 # to remove the .cvsignore files also.
1064 if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi;
1065 if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi;
1066 tar cf - ./makefile ./ICU.plist ./license.html ./icuSources ./cldrFiles $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \
1067 for i in `find $(SRCROOT)/icuSources/ | grep "CVS$$"` ; do \
1068 if test -d $$i ; then \
1072 for j in `find $(SRCROOT)/icuSources/ | grep ".cvsignore"` ; do \
1073 if test -f $$j ; then \
1078 # This works. Just not for ~ in the DEST_ROOT. We run configure first (in case it hasn't
1079 # been already). Then we make the install-headers target on specific makefiles (since
1080 # not every subdirectory/sub-component has a install-headers target).
1082 # installhdrs should be no-op for RC_INDIGO
1083 ifeq "$(RC_INDIGO)" "YES"
1086 installhdrs : installhdrsint
1089 installhdrsint : $(OBJROOT_CURRENT)/Makefile
1090 (cd $(OBJROOT_CURRENT); \
1091 for subdir in $(HDR_MAKE_SUBDIR); do \
1092 (cd $$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-headers); \
1094 if test "$(APPLE_EMBEDDED)" = "YES"; then \
1095 if test ! -d $(DEST_ROOT)$(HDR_PREFIX)/include/unicode/; then \
1096 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(HDR_PREFIX)/include/unicode/; \
1098 if test -d $(DEST_ROOT)$(PRIVATE_HDR_PREFIX)/include/unicode/; then \
1099 (cd $(DEST_ROOT)$(PRIVATE_HDR_PREFIX)/include/unicode; \
1101 if fgrep -q -x $$i $(SRCROOT)/minimalapis.txt ; then \
1102 mv $$i $(DEST_ROOT)$(HDR_PREFIX)/include/unicode ; \
1105 $(CC) $(SRCROOT)/minimalapisTest.c $(INSTALLHDRS_ARCH) $(ISYSROOT) -nostdinc \
1106 -I $(DEST_ROOT)$(HDR_PREFIX)/include/ -I $(SDKPATH)/usr/include/ -E > /dev/null ; \
1108 if test ! -d $(DEST_ROOT)$(CLDRFILESDIR)/; then \
1109 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(CLDRFILESDIR)/; \
1111 $(INSTALL) -b -m 0644 $(SRCROOT)/cldrFiles/supplementalData.xml $(DEST_ROOT)$(CLDRFILESDIR)/supplementalData.xml; \
1115 # We run configure and run make first. This generates the .o files. We then link them
1116 # all up together into libicucore. Then we put it into its install location, create
1117 # symbolic links, and then strip the main dylib. Then install the remaining libraries.
1118 # We cleanup the sources folder.
1120 install : installhdrsint icu
1121 if test "$(WINDOWS)" = "YES"; then \
1122 if test ! -d $(DEST_ROOT)$(winprogdir)/; then \
1123 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winprogdir)/; \
1125 if test ! -d $(DEST_ROOT)$(winintlibdir)/; then \
1126 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winintlibdir)/; \
1128 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc.lib $(DEST_ROOT)$(winintlibdir)libicuuc.lib; \
1129 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc.pdb $(DEST_ROOT)$(winprogdir)libicuuc.pdb; \
1130 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuuc.dll $(DEST_ROOT)$(winprogdir)libicuuc.dll; \
1131 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin.lib $(DEST_ROOT)$(winintlibdir)libicuin.lib; \
1132 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin.pdb $(DEST_ROOT)$(winprogdir)libicuin.pdb; \
1133 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuin.dll $(DEST_ROOT)$(winprogdir)libicuin.dll; \
1134 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icudt$(ICU_VERS).dll $(DEST_ROOT)$(winprogdir)icudt$(ICU_VERS).dll; \
1135 if test "$(ARCH64)" != "YES"; then \
1136 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/shim/icuuc.lib $(DEST_ROOT)$(winintlibdir)icuuc.lib; \
1137 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/icuuc40.pdb $(DEST_ROOT)$(winprogdir)icuuc40.pdb; \
1138 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icuuc40.dll $(DEST_ROOT)$(winprogdir)icuuc40.dll; \
1139 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/shim/icuin.lib $(DEST_ROOT)$(winintlibdir)icuin.lib; \
1140 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/icuin40.pdb $(DEST_ROOT)$(winprogdir)icuin40.pdb; \
1141 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icuin40.dll $(DEST_ROOT)$(winprogdir)icuin40.dll; \
1144 if test ! -d $(DEST_ROOT)$(libdir)/; then \
1145 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \
1147 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \
1148 if test "$(LINUX)" = "YES"; then \
1149 cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \
1150 strip -x -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \
1152 (cd $(DEST_ROOT)$(libdir); \
1153 ln -fs $(INSTALLED_DYLIB) $(DYLIB)); \
1154 cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \
1155 if test "$(APPLE_EMBEDDED)" = "NO"; then \
1156 $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \
1158 $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \
1160 for subdir in $(EXTRA_LIBS); do \
1161 (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \
1163 if test ! -d $(DEST_ROOT)$(DATA_INSTALL_DIR)/; then \
1164 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(DATA_INSTALL_DIR)/; \
1166 if test -f $(OBJROOT_CURRENT)/$(L_DATA_FILE); then \
1167 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/$(L_DATA_FILE) $(DEST_ROOT)$(DATA_INSTALL_DIR)$(L_DATA_FILE); \
1169 if test ! -d $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; then \
1170 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; \
1172 $(INSTALL) -b -m 0644 $(SRCROOT)/ICU.plist $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)ICU.plist; \
1173 if test ! -d $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)/; then \
1174 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)/; \
1176 $(INSTALL) -b -m 0644 $(SRCROOT)/license.html $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)ICU.html; \
1177 if test -f $(OBJROOT_CURRENT)/$(INFOTOOL); then \
1178 if test ! -d $(DEST_ROOT)$(localtooldir)/; then \
1179 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(localtooldir)/; \
1181 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INFOTOOL) $(DEST_ROOT)$(localtooldir)$(INFOTOOL); \
1182 if test "$(LINUX)" != "YES"; then \
1183 cp $(OBJROOT_CURRENT)/$(INFOTOOL) $(SYMROOT_CURRENT)/$(INFOTOOL); \
1184 if test "$(APPLE_EMBEDDED)" = "NO"; then \
1185 $(DSYMTOOL) -o $(SYMROOT_CURRENT)/$(INFOTOOL)$(DSYMSUFFIX) $(SYMROOT_CURRENT)/$(INFOTOOL); \
1191 DEPEND_install_debug = debug
1192 DEPEND_install_profile = profile
1195 install_debug install_profile : $$(DEPEND_$$@)
1196 if test "$(WINDOWS)" = "YES"; then \
1197 if test ! -d $(DEST_ROOT)$(winprogdir)/; then \
1198 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winprogdir)/; \
1200 if test ! -d $(DEST_ROOT)$(winintlibdir)/; then \
1201 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winintlibdir)/; \
1203 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).lib $(DEST_ROOT)$(winintlibdir)libicuuc_$(DEPEND_$@).lib; \
1204 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).pdb $(DEST_ROOT)$(winprogdir)libicuuc_$(DEPEND_$@).pdb; \
1205 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuuc_$(DEPEND_$@).dll $(DEST_ROOT)$(winprogdir)libicuuc_$(DEPEND_$@).dll; \
1206 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).lib $(DEST_ROOT)$(winintlibdir)libicuin_$(DEPEND_$@).lib; \
1207 $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).pdb $(DEST_ROOT)$(winprogdir)libicuin_$(DEPEND_$@).pdb; \
1208 $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuin_$(DEPEND_$@).dll $(DEST_ROOT)$(winprogdir)libicuin_$(DEPEND_$@).dll; \
1210 if test ! -d $(DEST_ROOT)$(libdir)/; then \
1211 $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \
1213 $(INSTALL) -b -m 0664 $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
1214 if test "$(LINUX)" = "YES"; then \
1215 cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
1216 strip -x -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
1218 (cd $(DEST_ROOT)$(libdir); \
1219 ln -fs $($(INSTALLED_DYLIB_$(DEPEND_$@))) $($(DYLIB_$(DEPEND_$@)))); \
1220 cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
1221 $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
1223 for subdir in $(EXTRA_LIBS); do \
1224 (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \