]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## |
46f4442e | 2 | # Wrapper makefile for ICU |
b331163b | 3 | # Copyright (C) 2003-2015 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 A |
8 | ################################# |
9 | # Notes on building for AAS using Windows (7) + Visual Studio (2010) + Cygwin: | |
10 | # | |
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): | |
15 | # | |
16 | # 1. From VS command prompt, run vcvarsall.bat to set various environment variables. | |
17 | # For a 32-bit build: | |
18 | # > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
19 | # For a 64-bit build: | |
20 | # > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64 | |
21 | # | |
22 | # 2. Launch Cygwin, e.g. | |
23 | # > C:\cygwin\Cygwin.bat | |
24 | # | |
25 | # 3. Within cygwin, cd to the top level of the ICU sources directory, e.g. | |
26 | # $ cd ICU | |
27 | # | |
28 | # 4. Adjust the PATH to put the appropriate VC tools directory first: | |
29 | # For a 32-bit build: | |
30 | # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/":$PATH | |
31 | # For a 64-bit build: | |
32 | # $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/":$PATH | |
33 | # | |
34 | # 5. Run the ICU makefile | |
35 | # For a 32-bit build: | |
36 | # make [install] WINDOWS=YES [ARCH64=NO] [DSTROOT=...] | |
37 | # For a 64-bit build: | |
38 | # make [install] WINDOWS=YES ARCH64=YES [DSTROOT=...] | |
39 | # | |
40 | ################################# | |
b75a7d8f A |
41 | |
42 | ################################# | |
43 | ################################# | |
44 | # MAKE VARS | |
45 | ################################# | |
46 | ################################# | |
47 | ||
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. | |
52 | ||
b75a7d8f | 53 | # Sane defaults, which are typically overridden on the command line. |
73c04bcf | 54 | WINDOWS=NO |
729e4ab9 A |
55 | LINUX=NO |
56 | ARCH64=NO | |
57 | ||
51004dcb A |
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) | |
65 | endif | |
66 | endif | |
67 | $(info # PATH=$(PATH)) | |
68 | ||
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" | |
72 | SHELL := /bin/bash | |
73 | else | |
74 | SHELL := /bin/sh | |
75 | endif | |
76 | ||
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 | |
79 | # already defined. | |
80 | ifeq "$(WINDOWS)" "YES" | |
81 | ifneq "$(VS100VCTOOLS_PATH)" "" | |
82 | ifdef SRCROOT | |
83 | SRCROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SRCROOT))) | |
84 | endif | |
85 | ifdef OBJROOT | |
86 | OBJROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(OBJROOT))) | |
87 | endif | |
88 | ifdef DSTROOT | |
89 | DSTROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(DSTROOT))) | |
90 | endif | |
91 | ifdef SYMROOT | |
92 | SYMROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SYMROOT))) | |
93 | endif | |
94 | endif | |
95 | endif | |
96 | ||
97 | ifndef SRCROOT | |
98 | SRCROOT:=$(shell pwd) | |
99 | endif | |
100 | ifndef OBJROOT | |
101 | OBJROOT:=$(SRCROOT)/build | |
102 | endif | |
103 | ifndef DSTROOT | |
104 | DSTROOT:=$(OBJROOT) | |
105 | endif | |
106 | ifndef SYMROOT | |
107 | SYMROOT:=$(OBJROOT) | |
108 | endif | |
109 | ||
110 | ifeq "$(WINDOWS)" "YES" | |
111 | ifeq "$(ARCH64)" "YES" | |
112 | OBJROOT_CURRENT=$(OBJROOT)/obj64 | |
113 | SYMROOT_CURRENT=$(SYMROOT)/obj64 | |
114 | else | |
115 | OBJROOT_CURRENT=$(OBJROOT)/obj32 | |
116 | SYMROOT_CURRENT=$(SYMROOT)/obj32 | |
117 | endif | |
118 | else ifeq "$(LINUX)" "YES" | |
119 | ifeq "$(ARCH64)" "YES" | |
120 | OBJROOT_CURRENT=$(OBJROOT)/obj64 | |
121 | SYMROOT_CURRENT=$(SYMROOT)/obj64 | |
122 | else | |
123 | OBJROOT_CURRENT=$(OBJROOT)/obj32 | |
124 | SYMROOT_CURRENT=$(SYMROOT)/obj32 | |
125 | endif | |
126 | else | |
127 | OBJROOT_CURRENT=$(OBJROOT) | |
128 | SYMROOT_CURRENT=$(SYMROOT) | |
129 | endif | |
729e4ab9 | 130 | CROSSHOST_OBJROOT=$(OBJROOT)/crossbuildhost |
b75a7d8f A |
131 | APPLE_INTERNAL_DIR=/AppleInternal |
132 | RC_ARCHS= | |
b331163b A |
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 | |
139 | else | |
140 | IOS_VERSION_TARGET_STRING=$(IPHONEOS_DEPLOYMENT_TARGET) | |
141 | endif | |
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 | |
146 | else | |
147 | OSX_VERSION_TARGET_STRING=$(MACOSX_DEPLOYMENT_TARGET) | |
148 | endif | |
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 | |
153 | else | |
154 | WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_DEPLOYMENT_TARGET) | |
155 | endif | |
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 | |
160 | else | |
161 | TVOS_VERSION_TARGET_STRING=$(TVOS_DEPLOYMENT_TARGET) | |
162 | endif | |
729e4ab9 | 163 | |
51004dcb A |
164 | $(info # SRCROOT=$(SRCROOT)) |
165 | $(info # DSTROOT=$(DSTROOT)) | |
166 | $(info # OBJROOT=$(OBJROOT)) | |
b331163b A |
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)) | |
51004dcb A |
171 | |
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 | |
174 | # hardcode here. | |
175 | ifeq "$(WINDOWS)" "YES" | |
176 | UNAME_PROCESSOR:=i386 | |
177 | else | |
178 | UNAME_PROCESSOR:=$(shell uname -p) | |
179 | endif | |
57a6839d | 180 | |
b331163b A |
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)/ | |
184 | ||
57a6839d A |
185 | ifndef SDKROOT |
186 | SDKPATH:=/ | |
187 | else ifeq "$(SDKROOT)" "" | |
188 | SDKPATH:=/ | |
189 | else | |
190 | SDKPATH:=$(shell xcodebuild -version -sdk $(SDKROOT) Path) | |
191 | ifeq "$(SDKPATH)" "" | |
192 | SDKPATH:=/ | |
193 | endif | |
51004dcb | 194 | endif |
729e4ab9 | 195 | ifneq "$(RC_ARCHS)" "" |
57a6839d | 196 | ifneq "$(filter arm armv6 armv7 armv7s arm64,$(RC_ARCHS))" "" |
729e4ab9 | 197 | CROSS_BUILD=YES |
57a6839d | 198 | BUILD_TYPE=DEVICE |
729e4ab9 A |
199 | else ifeq "$(RC_INDIGO)" "YES" |
200 | CROSS_BUILD=YES | |
57a6839d | 201 | BUILD_TYPE=SIMULATOR |
729e4ab9 A |
202 | else |
203 | CROSS_BUILD=NO | |
57a6839d | 204 | BUILD_TYPE= |
729e4ab9 A |
205 | endif |
206 | INSTALLHDRS_ARCH=-arch $(shell echo $(RC_ARCHS) | cut -d' ' -f1) | |
73c04bcf | 207 | else |
729e4ab9 A |
208 | CROSS_BUILD=NO |
209 | INSTALLHDRS_ARCH= | |
57a6839d | 210 | BUILD_TYPE= |
73c04bcf | 211 | endif |
729e4ab9 A |
212 | $(info # RC_ARCHS=$(RC_ARCHS)) |
213 | $(info # INSTALLHDRS_ARCH=$(INSTALLHDRS_ARCH)) | |
214 | $(info # buildhost=$(UNAME_PROCESSOR)) | |
57a6839d A |
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)) | |
221 | ||
729e4ab9 A |
222 | |
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. | |
227 | # | |
228 | ifeq "$(CROSS_BUILD)" "YES" | |
229 | RC_ARCHS_FIRST=$(shell echo $(RC_ARCHS) | cut -d' ' -f1) | |
57a6839d | 230 | TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin14.0.0 |
51004dcb | 231 | ENV_CONFIGURE_ARCHS=-arch $(RC_ARCHS_FIRST) |
729e4ab9 A |
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 | |
236 | else | |
237 | FORCEENDIAN= | |
238 | endif | |
239 | else ifeq "$(LINUX)" "YES" | |
240 | TARGET_SPEC=$(UNAME_PROCESSOR)-unknown-linux-gnu | |
241 | ENV_CONFIGURE_ARCHS= | |
51004dcb A |
242 | ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata" |
243 | ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg | |
729e4ab9 | 244 | FORCEENDIAN= |
46f4442e | 245 | else |
57a6839d | 246 | TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin14.0.0 |
729e4ab9 | 247 | ENV_CONFIGURE_ARCHS= |
51004dcb A |
248 | ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata" |
249 | ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg | |
729e4ab9 | 250 | FORCEENDIAN= |
46f4442e | 251 | endif |
729e4ab9 A |
252 | $(info # TARGET_SPEC=$(TARGET_SPEC)) |
253 | $(info # ENV_CONFIGURE_ARCHS=$(ENV_CONFIGURE_ARCHS)) | |
46f4442e | 254 | |
57a6839d A |
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) | |
46f4442e A |
258 | endif |
259 | ||
57a6839d | 260 | ifeq "$(BUILD_TYPE)" "DEVICE" |
729e4ab9 | 261 | THUMB_FLAG = -mthumb |
57a6839d A |
262 | else |
263 | THUMB_FLAG = | |
729e4ab9 A |
264 | endif |
265 | ||
51004dcb | 266 | # even for a crossbuild host build, we want to use the target's latest tzdata as pointed to by latest_tzdata.tar.gz |
08b89b0a A |
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) | |
269 | endif | |
729e4ab9 A |
270 | $(info # TZDATA=$(TZDATA)) |
271 | ||
272 | ifeq "$(WINDOWS)" "YES" | |
273 | EMBEDDED:=0 | |
b331163b A |
274 | WATCHOS:=0 |
275 | TVOS:=0 | |
276 | SIMULATOROS := 0 | |
729e4ab9 A |
277 | else ifeq "$(LINUX)" "YES" |
278 | CC := gcc | |
279 | CXX := g++ | |
46f4442e | 280 | EMBEDDED:=0 |
b331163b A |
281 | WATCHOS:=0 |
282 | TVOS:=0 | |
283 | SIMULATOROS := 0 | |
729e4ab9 | 284 | ISYSROOT = |
729e4ab9 | 285 | else |
57a6839d A |
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) | |
292 | else | |
293 | HOSTSDKPATH := $(shell xcodebuild -version -sdk macosx.internal Path) | |
294 | endif | |
51004dcb | 295 | else |
57a6839d | 296 | HOSTSDKPATH := $(SDKPATH) |
51004dcb | 297 | endif |
57a6839d | 298 | ISYSROOT:= -isysroot $(HOSTSDKPATH) |
51004dcb A |
299 | CC := $(HOSTCC) |
300 | CXX := $(HOSTCXX) | |
301 | NM := $(shell xcrun -find nm) | |
302 | STRIPCMD := $(shell xcrun -find strip) | |
303 | else | |
304 | HOSTCC := $(shell xcrun -sdk macosx -find cc) | |
305 | HOSTCXX := $(shell xcrun -sdk macosx -find c++) | |
57a6839d A |
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) | |
51004dcb | 312 | endif |
57a6839d | 313 | HOSTISYSROOT = -isysroot $(HOSTSDKPATH) |
b331163b A |
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) | |
46f4442e | 318 | endif |
51004dcb A |
319 | DSYMTOOL := /usr/bin/dsymutil |
320 | DSYMSUFFIX := .dSYM | |
321 | ||
322 | $(info # HOSTCC=$(HOSTCC)) | |
323 | $(info # HOSTCXX=$(HOSTCXX)) | |
324 | $(info # HOSTISYSROOT=$(HOSTISYSROOT)) | |
4388f060 A |
325 | $(info # CC=$(CC)) |
326 | $(info # CXX=$(CXX)) | |
51004dcb | 327 | $(info # ISYSROOT=$(ISYSROOT)) |
46f4442e A |
328 | |
329 | ifeq "$(EMBEDDED)" "1" | |
330 | export APPLE_EMBEDDED=YES | |
729e4ab9 | 331 | DISABLE_DRAFT=YES |
46f4442e A |
332 | else ifeq "$(RC_INDIGO)" "YES" |
333 | export APPLE_EMBEDDED=YES | |
729e4ab9 | 334 | DISABLE_DRAFT=YES |
46f4442e A |
335 | else |
336 | export APPLE_EMBEDDED=NO | |
729e4ab9 A |
337 | DISABLE_DRAFT=NO |
338 | endif | |
339 | ||
4388f060 | 340 | ifeq "$(APPLE_EMBEDDED)" "YES" |
b331163b A |
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) | |
345 | else | |
346 | ICU_TARGET_VERSION := -miphoneos-version-min=$(IOS_VERSION_TARGET_STRING) | |
347 | endif | |
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) | |
353 | else | |
354 | ICU_TARGET_VERSION := -mios-simulator-version-min=$(IOS_VERSION_TARGET_STRING) | |
355 | endif | |
4388f060 A |
356 | else |
357 | ICU_TARGET_VERSION := | |
358 | endif | |
359 | $(info # ICU_TARGET_VERSION=$(ICU_TARGET_VERSION)) | |
360 | ||
729e4ab9 A |
361 | ifeq "$(DISABLE_DRAFT)" "YES" |
362 | DRAFT_FLAG=--disable-draft | |
363 | else | |
364 | DRAFT_FLAG= | |
73c04bcf A |
365 | endif |
366 | ||
367 | ifndef RC_ProjectSourceVersion | |
368 | ifdef RC_PROJECTSOURCEVERSION | |
369 | RC_ProjectSourceVersion=$(RC_PROJECTSOURCEVERSION) | |
370 | endif | |
371 | endif | |
372 | ||
729e4ab9 A |
373 | # An Apple submission version (passed in RC_ProjectSourceVersion for official builds) is |
374 | # X[.Y[.Z]] | |
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 | |
73c04bcf A |
378 | ifneq "$(RC_ProjectSourceVersion)" "" |
379 | ifeq "$(WINDOWS)" "YES" | |
729e4ab9 A |
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/') | |
73c04bcf | 383 | else |
729e4ab9 A |
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/') | |
387 | endif | |
388 | ifeq "$(ICU_BUILD_Y)" "" | |
389 | ICU_BUILD := 0 | |
390 | else | |
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)) | |
395 | else | |
396 | ifeq "$(ICU_BUILD_Z2)" "" | |
397 | ICU_BUILD := $(subst b,0,$(ICU_BUILD)) | |
398 | ICU_BUILD := $(subst c,$(ICU_BUILD_Z1),$(ICU_BUILD)) | |
399 | else | |
400 | ICU_BUILD := $(subst b,$(ICU_BUILD_Z1),$(ICU_BUILD)) | |
401 | ICU_BUILD := $(subst c,$(ICU_BUILD_Z2),$(ICU_BUILD)) | |
402 | endif | |
403 | endif | |
73c04bcf A |
404 | endif |
405 | else | |
406 | ICU_BUILD := 0 | |
407 | endif | |
729e4ab9 | 408 | $(info # ICU_BUILD=$(ICU_BUILD)) |
51004dcb A |
409 | ifeq "$(ICU_BUILD)" "0" |
410 | DEFINE_BUILD_LEVEL = | |
411 | else | |
412 | DEFINE_BUILD_LEVEL =-DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) | |
413 | endif | |
b75a7d8f | 414 | |
374ca955 A |
415 | # Disallow $(SRCROOT) == $(OBJROOT) |
416 | ifeq ($(OBJROOT), $(SRCROOT)) | |
417 | $(error SRCROOT same as OBJROOT) | |
418 | endif | |
b75a7d8f | 419 | |
729e4ab9 A |
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) | |
425 | endif | |
426 | ifeq "$(LINUX)" "YES" | |
427 | $(error Cross-builds currently not allowed on Linux) | |
428 | endif | |
429 | endif | |
430 | ||
b75a7d8f A |
431 | ################################# |
432 | # Headers | |
433 | ################################# | |
434 | ||
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. | |
441 | ||
442 | EXTRA_HDRS = | |
443 | # EXTRA_HDRS = ./extra/ustdio/ ./layout/ | |
46f4442e | 444 | ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
445 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) |
446 | else ifeq "$(WINDOWS)" "YES" | |
447 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) | |
448 | else | |
449 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ ./io/ $(EXTRA_HDRS) | |
450 | endif | |
451 | ifeq "$(WINDOWS)" "YES" | |
73c04bcf | 452 | PRIVATE_HDR_PREFIX=$(APPLE_INTERNAL_DIR) |
729e4ab9 | 453 | else ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
454 | HDR_PREFIX=/usr |
455 | PRIVATE_HDR_PREFIX=/usr/local | |
729e4ab9 A |
456 | else |
457 | PRIVATE_HDR_PREFIX=/usr/local | |
73c04bcf | 458 | endif |
b75a7d8f A |
459 | |
460 | ################################# | |
461 | # Install | |
462 | ################################# | |
463 | ||
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. | |
468 | ||
469 | INSTALL = /usr/bin/install | |
470 | COMMON_OBJ = ./common/*.o | |
471 | I18N_OBJ = ./i18n/*.o | |
73c04bcf | 472 | IO_OBJ = ./io/*.o |
b75a7d8f A |
473 | STUB_DATA_OBJ = ./stubdata/*.o |
474 | EXTRA_LIBS = | |
475 | #EXTRA_LIBS =./extra/ ./layout/ ./tools/ctestfw/ ./tools/toolutil/ | |
476 | #DATA_OBJ = ./data/out/build/*.o | |
46f4442e | 477 | ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
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) | |
481 | else | |
482 | DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(IO_OBJ) $(STUB_DATA_OBJ) | |
483 | endif | |
b75a7d8f | 484 | |
46f4442e A |
485 | ################################# |
486 | # Sources | |
487 | ################################# | |
488 | ||
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. | |
492 | ||
b331163b A |
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 | |
46f4442e | 496 | |
b75a7d8f A |
497 | ################################# |
498 | # Cleaning | |
499 | ################################# | |
500 | ||
501 | #We need to clean after installing. | |
502 | ||
503 | EXTRA_CLEAN = | |
504 | ||
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 | |
510 | ||
73c04bcf | 511 | CLEAN_SUBDIR = ./stubdata ./common ./i18n ./io ./layout ./layoutex ./data ./tools ./$(MANUAL_CLEAN_TOOLS) $(MANUAL_CLEAN_EXTRA) $(MANUAL_CLEAN_TEST) $(MANUAL_CLEAN_SAMPLE) |
b75a7d8f A |
512 | |
513 | ################################# | |
514 | # Config flags | |
515 | ################################# | |
516 | ||
729e4ab9 | 517 | ifeq "$(WINDOWS)" "YES" |
51004dcb A |
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 \ | |
521 | $(DRAFT_FLAG) | |
522 | else | |
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 \ | |
525 | $(DRAFT_FLAG) | |
526 | endif | |
729e4ab9 A |
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 \ | |
531 | $(DRAFT_FLAG) | |
532 | else | |
533 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
534 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \ | |
535 | $(DRAFT_FLAG) | |
536 | endif | |
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) \ | |
4388f060 | 540 | $(DRAFT_FLAG) |
73c04bcf | 541 | else |
729e4ab9 A |
542 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ |
543 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \ | |
4388f060 | 544 | $(DRAFT_FLAG) |
73c04bcf | 545 | endif |
b75a7d8f A |
546 | |
547 | ################################# | |
548 | # Install paths | |
549 | ################################# | |
550 | ||
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. | |
557 | ||
374ca955 | 558 | LIB_NAME = icucore |
b331163b | 559 | ICU_VERS = 55 |
729e4ab9 | 560 | ICU_SUBVERS = 1 |
b75a7d8f | 561 | CORE_VERS = A |
b75a7d8f | 562 | |
73c04bcf A |
563 | ifeq "$(WINDOWS)" "YES" |
564 | DYLIB_SUFF = dll | |
51004dcb A |
565 | ifeq "$(ARCH64)" "YES" |
566 | winprogdir = /Program\ Files/Common\ Files/Apple/Apple\ Application\ Support/ | |
567 | winintlibdir = /AppleInternal/lib64/ | |
568 | else | |
569 | winprogdir = /Program\ Files\ \(x86\)/Common\ Files/Apple/Apple\ Application\ Support/ | |
570 | winintlibdir = /AppleInternal/lib32/ | |
571 | endif | |
572 | libdir = | |
729e4ab9 A |
573 | else ifeq "$(LINUX)" "YES" |
574 | DYLIB_SUFF = so | |
575 | ifeq "$(ARCH64)" "YES" | |
576 | libdir = /usr/lib64/ | |
577 | else | |
578 | libdir = /usr/lib/ | |
579 | endif | |
51004dcb A |
580 | winprogdir = |
581 | winintlibdir = | |
73c04bcf A |
582 | else |
583 | DYLIB_SUFF = dylib | |
584 | libdir = /usr/lib/ | |
51004dcb A |
585 | winprogdir = |
586 | winintlibdir = | |
73c04bcf A |
587 | endif |
588 | ||
374ca955 | 589 | DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF) |
73c04bcf A |
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) | |
729e4ab9 A |
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) | |
73c04bcf A |
600 | else |
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) | |
604 | endif | |
605 | ||
606 | INSTALLED_DYLIB_icu = INSTALLED_DYLIB | |
607 | INSTALLED_DYLIB_debug = INSTALLED_DYLIB_DEBUG | |
608 | INSTALLED_DYLIB_profile = INSTALLED_DYLIB_PROFILE | |
609 | DYLIB_icu = DYLIB | |
610 | DYLIB_debug = DYLIB_DEBUG | |
611 | DYLIB_profile = DYLIB_PROFILE | |
b75a7d8f A |
612 | |
613 | ################################# | |
614 | # Data files | |
615 | ################################# | |
616 | ||
374ca955 A |
617 | OPEN_SOURCE_VERSIONS_DIR=/usr/local/OpenSourceVersions/ |
618 | OPEN_SOURCE_LICENSES_DIR=/usr/local/OpenSourceLicenses/ | |
51004dcb | 619 | |
b75a7d8f A |
620 | B_DATA_FILE=icudt$(ICU_VERS)b.dat |
621 | L_DATA_FILE=icudt$(ICU_VERS)l.dat | |
51004dcb A |
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/ | |
628 | else | |
629 | ifeq "$(RC_INDIGO)" "YES" | |
630 | DATA_LOOKUP_DIR=/usr/share/icu/ | |
631 | else | |
632 | DATA_LOOKUP_DIR=/var/db/icu/ | |
633 | endif | |
634 | endif | |
635 | DATA_LOOKUP_DIR_BUILDHOST=/usr/share/icu/ | |
636 | ||
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 | |
641 | else | |
642 | DATA_DIR_PREFIX_ENV_VAR= | |
643 | endif | |
b75a7d8f | 644 | |
729e4ab9 A |
645 | ################################# |
646 | # Info tool | |
647 | ################################# | |
648 | ||
649 | localtooldir=/usr/local/bin/ | |
650 | ||
651 | INFOTOOL = icuinfo | |
652 | ||
653 | INFOTOOL_OBJS = ./tools/icuinfo/icuinfo.o ./tools/toolutil/udbgutil.o ./tools/toolutil/uoptions.o | |
654 | ||
57a6839d A |
655 | ################################# |
656 | # CLDR file(s) | |
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 | ################################# | |
662 | ||
663 | CLDRFILESDIR=/usr/local/share/cldr | |
664 | ||
374ca955 A |
665 | ################################# |
666 | # Environment variables | |
667 | ################################# | |
668 | ||
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). | |
674 | ||
51004dcb A |
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)" | |
374ca955 | 678 | |
46f4442e A |
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. | |
73c04bcf | 681 | ifeq "$(WINDOWS)" "YES" |
51004dcb A |
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" | |
73c04bcf | 686 | else |
51004dcb A |
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" | |
73c04bcf | 690 | endif |
51004dcb A |
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" | |
73c04bcf | 697 | ENV_PROFILE= |
729e4ab9 | 698 | else ifeq "$(LINUX)" "YES" |
729e4ab9 | 699 | ifeq "$(ARCH64)" "YES" |
51004dcb A |
700 | ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
701 | CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \ | |
729e4ab9 A |
702 | CC="$(CC)" \ |
703 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 706 | TZDATA="$(TZDATA)" \ |
51004dcb A |
707 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64" |
708 | ||
709 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
729e4ab9 A |
710 | CC="$(CC)" \ |
711 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 714 | TZDATA="$(TZDATA)" \ |
51004dcb A |
715 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64" |
716 | ||
717 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
729e4ab9 A |
718 | CC="$(CC)" \ |
719 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 722 | TZDATA="$(TZDATA)" \ |
51004dcb | 723 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64" |
729e4ab9 | 724 | |
51004dcb | 725 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
726 | CC="$(CC)" \ |
727 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 730 | TZDATA="$(TZDATA)" \ |
51004dcb | 731 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib64" |
729e4ab9 | 732 | else |
51004dcb A |
733 | ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
734 | CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \ | |
729e4ab9 A |
735 | CC="$(CC)" \ |
736 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 739 | TZDATA="$(TZDATA)" \ |
51004dcb | 740 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 741 | |
51004dcb | 742 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
743 | CC="$(CC)" \ |
744 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 747 | TZDATA="$(TZDATA)" \ |
51004dcb | 748 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 749 | |
51004dcb | 750 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
751 | CC="$(CC)" \ |
752 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 755 | TZDATA="$(TZDATA)" \ |
51004dcb | 756 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 757 | |
51004dcb | 758 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
759 | CC="$(CC)" \ |
760 | CXX="$(CXX)" \ | |
51004dcb A |
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" \ | |
729e4ab9 | 763 | TZDATA="$(TZDATA)" \ |
51004dcb | 764 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 765 | endif |
73c04bcf | 766 | else |
51004dcb A |
767 | CPPOPTIONS = |
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)" \ | |
729e4ab9 A |
770 | CC="$(CC)" \ |
771 | CXX="$(CXX)" \ | |
57a6839d A |
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)" \ | |
729e4ab9 A |
774 | RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\ |
775 | TZDATA="$(TZDATA)" \ | |
51004dcb | 776 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 777 | |
51004dcb | 778 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
779 | CC="$(CC)" \ |
780 | CXX="$(CXX)" \ | |
57a6839d A |
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)" \ | |
73c04bcf A |
783 | RC_ARCHS="$(RC_ARCHS)" \ |
784 | TZDATA="$(TZDATA)" \ | |
51004dcb | 785 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
73c04bcf | 786 | |
51004dcb | 787 | ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
788 | CC="$(CC)" \ |
789 | CXX="$(CXX)" \ | |
57a6839d A |
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)" \ | |
73c04bcf A |
792 | RC_ARCHS="$(RC_ARCHS)" \ |
793 | TZDATA="$(TZDATA)" \ | |
51004dcb | 794 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
73c04bcf | 795 | |
51004dcb | 796 | ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
797 | CC="$(CC)" \ |
798 | CXX="$(CXX)" \ | |
57a6839d A |
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)" \ | |
73c04bcf A |
801 | RC_ARCHS="$(RC_ARCHS)" \ |
802 | TZDATA="$(TZDATA)" \ | |
51004dcb A |
803 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
804 | ||
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)" \ | |
807 | CC="$(HOSTCC)" \ | |
808 | CXX="$(HOSTCXX)" \ | |
57a6839d A |
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" \ | |
729e4ab9 | 811 | TZDATA="$(TZDATA)" \ |
51004dcb | 812 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
73c04bcf | 813 | |
51004dcb A |
814 | ENV_BUILDHOST= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
815 | CC="$(HOSTCC)" \ | |
816 | CXX="$(HOSTCXX)" \ | |
57a6839d A |
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" \ | |
73c04bcf | 819 | TZDATA="$(TZDATA)" \ |
51004dcb | 820 | DYLD_LIBRARY_PATH="$(DEST_ROOT)usr/local/lib" |
729e4ab9 | 821 | |
73c04bcf | 822 | endif |
374ca955 | 823 | |
374ca955 A |
824 | ENV_icu = ENV |
825 | ENV_debug = ENV_DEBUG | |
73c04bcf | 826 | ENV_profile = ENV_PROFILE |
374ca955 | 827 | |
57a6839d A |
828 | ifeq "$(BUILD_TYPE)" "DEVICE" |
829 | ORDERFILE=$(SDKPATH)/AppleInternal/OrderFiles/libicucore.order | |
830 | else ifeq "$(APPLE_EMBEDDED)" "YES" | |
46f4442e A |
831 | ORDERFILE=$(SRCROOT)/ICU_embedded.order |
832 | else | |
833 | ORDERFILE=/usr/local/lib/OrderFiles/libicucore.order | |
834 | endif | |
374ca955 A |
835 | ifeq "$(shell test -f $(ORDERFILE) && echo YES )" "YES" |
836 | SECTORDER_FLAGS=-sectorder __TEXT __text $(ORDERFILE) | |
837 | else | |
838 | SECTORDER_FLAGS= | |
839 | endif | |
840 | ||
841 | ||
b75a7d8f A |
842 | ################################# |
843 | ################################# | |
844 | # TARGETS | |
845 | ################################# | |
846 | ################################# | |
374ca955 | 847 | |
729e4ab9 | 848 | .PHONY : icu check installsrc installhdrs installhdrsint clean install debug debug-install crossbuildhost |
374ca955 A |
849 | .DELETE_ON_ERROR : |
850 | ||
51004dcb A |
851 | icu debug profile : $(OBJROOT_CURRENT)/Makefile |
852 | echo "# make for target"; | |
853 | (cd $(OBJROOT_CURRENT); \ | |
374ca955 | 854 | $(MAKE) $($(ENV_$@)); \ |
73c04bcf | 855 | if test "$(WINDOWS)" = "YES"; then \ |
729e4ab9 A |
856 | (cd common; \ |
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; \ | |
859 | ); \ | |
860 | (cd i18n; \ | |
861 | rc.exe /folibicuin.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common libicuin.rc; \ | |
862 | ); \ | |
73c04bcf A |
863 | if test "$@" = "debug"; then \ |
864 | (cd common; \ | |
729e4ab9 A |
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; \ | |
868 | ); \ | |
73c04bcf | 869 | (cd i18n; \ |
729e4ab9 A |
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; \ | |
873 | ); \ | |
874 | else \ | |
729e4ab9 | 875 | (cd common; \ |
729e4ab9 | 876 | rm -f ../lib/libicuuc.dll.manifest; \ |
51004dcb A |
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; \ | |
881 | else \ | |
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; \ | |
885 | fi; \ | |
729e4ab9 | 886 | mt.exe -nologo -manifest ../lib/libicuuc.dll.manifest -outputresource:"../lib/libicuuc.dll;2"; \ |
729e4ab9 A |
887 | ); \ |
888 | (cd i18n; \ | |
729e4ab9 | 889 | rm -f ../lib/libicuin.dll.manifest; \ |
51004dcb A |
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; \ | |
894 | else \ | |
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; \ | |
898 | fi; \ | |
729e4ab9 | 899 | mt.exe -nologo -manifest ../lib/libicuin.dll.manifest -outputresource:"../lib/libicuin.dll;2"; \ |
729e4ab9 | 900 | ); \ |
51004dcb A |
901 | if test "$(ARCH64)" != "YES"; then \ |
902 | mkdir -p lib/shim; \ | |
903 | (cd common; \ | |
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"; \ | |
917 | ); \ | |
918 | (cd i18n; \ | |
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"; \ | |
932 | ); \ | |
933 | fi; \ | |
73c04bcf | 934 | fi; \ |
374ca955 | 935 | else \ |
729e4ab9 A |
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); \ | |
942 | else \ | |
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); \ | |
947 | fi; \ | |
948 | else \ | |
949 | tmpfile=`mktemp -t weakexternal.XXXXXX` || exit 1; \ | |
4388f060 | 950 | $(NM) -m $(RC_ARCHS:%=-arch %) $(DYLIB_OBJS) | fgrep "weak external" | fgrep -v "undefined" | sed -e 's/.*weak external[^_]*//' | sort | uniq | cat >$$tmpfile; \ |
729e4ab9 | 951 | $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \ |
4388f060 | 952 | $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ |
729e4ab9 A |
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) \ | |
57a6839d | 958 | $(LDFLAGS) -dead_strip -o ./$(INFOTOOL) $(INFOTOOL_OBJS) -L./ -l$(LIB_NAME) ; \ |
729e4ab9 A |
959 | fi; \ |
960 | fi; \ | |
51004dcb A |
961 | if test -f ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); then \ |
962 | ln -fs ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE); \ | |
73c04bcf | 963 | fi; \ |
51004dcb A |
964 | if test -f ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); then \ |
965 | ln -fs ./$(DATA_BUILD_SUBDIR)/$(L_DATA_FILE); \ | |
73c04bcf | 966 | else \ |
729e4ab9 | 967 | DYLD_LIBRARY_PATH=$(ICUPKGTOOLIBS) \ |
51004dcb | 968 | $(ICUPKGTOOL) -tl ./$(DATA_BUILD_SUBDIR)/$(B_DATA_FILE) $(L_DATA_FILE); \ |
73c04bcf | 969 | fi; \ |
374ca955 A |
970 | fi; \ |
971 | ); | |
972 | ||
729e4ab9 | 973 | crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile |
51004dcb | 974 | echo "# make for crossbuild host"; |
729e4ab9 A |
975 | (cd $(CROSSHOST_OBJROOT); \ |
976 | $(MAKE) $($(ENV_BUILDHOST)); \ | |
977 | ); | |
978 | ||
374ca955 | 979 | check : icu |
729e4ab9 | 980 | ifneq "$(CROSS_BUILD)" "YES" |
51004dcb A |
981 | (cd $(OBJROOT_CURRENT); \ |
982 | ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV) check; \ | |
73c04bcf | 983 | ); |
729e4ab9 A |
984 | else |
985 | $(warning check not supported for cross-build) | |
986 | endif | |
73c04bcf A |
987 | |
988 | check-debug: debug | |
729e4ab9 | 989 | ifneq "$(CROSS_BUILD)" "YES" |
51004dcb A |
990 | (cd $(OBJROOT_CURRENT); \ |
991 | ICU_DATA=$(OBJROOT_CURRENT) $(MAKE) $(ENV_DEBUG) check; \ | |
374ca955 | 992 | ); |
729e4ab9 A |
993 | else |
994 | $(warning check not supported for cross-build) | |
995 | endif | |
374ca955 A |
996 | |
997 | samples: icu | |
51004dcb | 998 | (cd $(OBJROOT_CURRENT)/samples; \ |
374ca955 A |
999 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ |
1000 | ); | |
1001 | ||
1002 | extra: icu | |
51004dcb | 1003 | (cd $(OBJROOT_CURRENT)/extra; \ |
374ca955 A |
1004 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ |
1005 | ); | |
1006 | ||
729e4ab9 | 1007 | ifneq "$(CROSS_BUILD)" "YES" |
51004dcb | 1008 | $(OBJROOT_CURRENT)/Makefile : |
729e4ab9 | 1009 | else |
51004dcb | 1010 | $(OBJROOT_CURRENT)/Makefile : crossbuildhost |
729e4ab9 | 1011 | endif |
51004dcb A |
1012 | if test ! -d $(OBJROOT_CURRENT); then \ |
1013 | mkdir -p $(OBJROOT_CURRENT); \ | |
374ca955 | 1014 | fi; |
51004dcb | 1015 | cp -Rpf $(SRCROOT)/icuSources/* $(OBJROOT_CURRENT)/; |
73c04bcf | 1016 | if test "$(WINDOWS)" = "YES"; then \ |
51004dcb A |
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);) \ | |
729e4ab9 | 1022 | elif test "$(LINUX)" = "YES"; then \ |
51004dcb A |
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);) \ | |
729e4ab9 | 1028 | elif test "$(CROSS_BUILD)" = "YES"; then \ |
51004dcb A |
1029 | echo "# configure for crossbuild target"; \ |
1030 | (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./configure --host=$(TARGET_SPEC) --with-cross-build=$(CROSSHOST_OBJROOT) $(CONFIG_FLAGS);) \ | |
73c04bcf | 1031 | else \ |
51004dcb A |
1032 | echo "# configure for non-crossbuild target"; \ |
1033 | (cd $(OBJROOT_CURRENT); $(ENV_CONFIGURE) ./runConfigureICU MacOSX $(CONFIG_FLAGS);) \ | |
374ca955 | 1034 | fi; |
46f4442e | 1035 | if test "$(APPLE_EMBEDDED)" = "YES"; then \ |
51004dcb | 1036 | (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/minimalpatchconfig.txt;) \ |
73c04bcf | 1037 | elif test "$(WINDOWS)" = "YES"; then \ |
51004dcb | 1038 | (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/windowspatchconfig.txt;) \ |
73c04bcf | 1039 | else \ |
51004dcb | 1040 | (cd $(OBJROOT_CURRENT)/common/unicode/; patch <$(SRCROOT)/patchconfig.txt;) \ |
73c04bcf | 1041 | fi; \ |
729e4ab9 A |
1042 | |
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); \ | |
1048 | fi; | |
4388f060 | 1049 | cp -Rpf $(SRCROOT)/icuSources/* $(CROSSHOST_OBJROOT); |
51004dcb | 1050 | echo "# configure for crossbuild host"; |
4388f060 A |
1051 | (cd $(CROSSHOST_OBJROOT); $(ENV_CONFIGURE_BUILDHOST) ./runConfigureICU MacOSX $(CONFIG_FLAGS);) |
1052 | (cd $(CROSSHOST_OBJROOT)/common/unicode/; patch <$(SRCROOT)/crosshostpatchconfig.txt;) | |
374ca955 A |
1053 | |
1054 | ################################# | |
1055 | # B&I TARGETS | |
1056 | ################################# | |
1057 | ||
b75a7d8f A |
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. | |
1062 | ||
1063 | installsrc : | |
1064 | if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi; | |
1065 | if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi; | |
57a6839d | 1066 | tar cf - ./makefile ./ICU.plist ./license.html ./icuSources ./cldrFiles $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \ |
b75a7d8f A |
1067 | for i in `find $(SRCROOT)/icuSources/ | grep "CVS$$"` ; do \ |
1068 | if test -d $$i ; then \ | |
1069 | rm -rf $$i; \ | |
1070 | fi; \ | |
1071 | done | |
1072 | for j in `find $(SRCROOT)/icuSources/ | grep ".cvsignore"` ; do \ | |
1073 | if test -f $$j ; then \ | |
1074 | rm -f $$j; \ | |
1075 | fi; \ | |
1076 | done | |
1077 | ||
46f4442e | 1078 | # This works. Just not for ~ in the DEST_ROOT. We run configure first (in case it hasn't |
b75a7d8f A |
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). | |
1081 | ||
46f4442e A |
1082 | # installhdrs should be no-op for RC_INDIGO |
1083 | ifeq "$(RC_INDIGO)" "YES" | |
1084 | installhdrs : | |
1085 | else | |
1086 | installhdrs : installhdrsint | |
1087 | endif | |
1088 | ||
51004dcb A |
1089 | installhdrsint : $(OBJROOT_CURRENT)/Makefile |
1090 | (cd $(OBJROOT_CURRENT); \ | |
73c04bcf | 1091 | for subdir in $(HDR_MAKE_SUBDIR); do \ |
46f4442e | 1092 | (cd $$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-headers); \ |
73c04bcf | 1093 | done; \ |
729e4ab9 A |
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/; \ | |
1097 | fi; \ | |
51004dcb | 1098 | if test -d $(DEST_ROOT)$(PRIVATE_HDR_PREFIX)/include/unicode/; then \ |
729e4ab9 A |
1099 | (cd $(DEST_ROOT)$(PRIVATE_HDR_PREFIX)/include/unicode; \ |
1100 | for i in *.h; do \ | |
1101 | if fgrep -q -x $$i $(SRCROOT)/minimalapis.txt ; then \ | |
1102 | mv $$i $(DEST_ROOT)$(HDR_PREFIX)/include/unicode ; \ | |
1103 | fi ; \ | |
1104 | done ); \ | |
1105 | $(CC) $(SRCROOT)/minimalapisTest.c $(INSTALLHDRS_ARCH) $(ISYSROOT) -nostdinc \ | |
57a6839d A |
1106 | -I $(DEST_ROOT)$(HDR_PREFIX)/include/ -I $(SDKPATH)/usr/include/ -E > /dev/null ; \ |
1107 | fi; \ | |
1108 | if test ! -d $(DEST_ROOT)$(CLDRFILESDIR)/; then \ | |
1109 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(CLDRFILESDIR)/; \ | |
729e4ab9 | 1110 | fi; \ |
57a6839d | 1111 | $(INSTALL) -b -m 0644 $(SRCROOT)/cldrFiles/supplementalData.xml $(DEST_ROOT)$(CLDRFILESDIR)/supplementalData.xml; \ |
729e4ab9 | 1112 | fi; \ |
73c04bcf | 1113 | ); |
374ca955 | 1114 | |
b75a7d8f A |
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. | |
73c04bcf | 1119 | |
46f4442e | 1120 | install : installhdrsint icu |
73c04bcf | 1121 | if test "$(WINDOWS)" = "YES"; then \ |
51004dcb A |
1122 | if test ! -d $(DEST_ROOT)$(winprogdir)/; then \ |
1123 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winprogdir)/; \ | |
1124 | fi; \ | |
1125 | if test ! -d $(DEST_ROOT)$(winintlibdir)/; then \ | |
1126 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winintlibdir)/; \ | |
1127 | fi; \ | |
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; \ | |
73c04bcf | 1142 | fi; \ |
73c04bcf | 1143 | else \ |
51004dcb A |
1144 | if test ! -d $(DEST_ROOT)$(libdir)/; then \ |
1145 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \ | |
1146 | fi; \ | |
1147 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ | |
729e4ab9 | 1148 | if test "$(LINUX)" = "YES"; then \ |
51004dcb | 1149 | cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \ |
729e4ab9 A |
1150 | strip -x -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ |
1151 | else \ | |
1152 | (cd $(DEST_ROOT)$(libdir); \ | |
1153 | ln -fs $(INSTALLED_DYLIB) $(DYLIB)); \ | |
51004dcb A |
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); \ | |
1157 | fi; \ | |
4388f060 | 1158 | $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ |
51004dcb | 1159 | fi; \ |
73c04bcf | 1160 | for subdir in $(EXTRA_LIBS); do \ |
51004dcb | 1161 | (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \ |
73c04bcf | 1162 | done; \ |
51004dcb A |
1163 | if test ! -d $(DEST_ROOT)$(DATA_INSTALL_DIR)/; then \ |
1164 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(DATA_INSTALL_DIR)/; \ | |
1165 | fi; \ | |
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); \ | |
73c04bcf | 1168 | fi; \ |
46f4442e A |
1169 | if test ! -d $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; then \ |
1170 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; \ | |
73c04bcf | 1171 | fi; \ |
46f4442e A |
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)/; \ | |
73c04bcf | 1175 | fi; \ |
46f4442e | 1176 | $(INSTALL) -b -m 0644 $(SRCROOT)/license.html $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)ICU.html; \ |
51004dcb A |
1177 | if test -f $(OBJROOT_CURRENT)/$(INFOTOOL); then \ |
1178 | if test ! -d $(DEST_ROOT)$(localtooldir)/; then \ | |
1179 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(localtooldir)/; \ | |
1180 | fi; \ | |
1181 | $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INFOTOOL) $(DEST_ROOT)$(localtooldir)$(INFOTOOL); \ | |
57a6839d A |
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); \ | |
1186 | fi; \ | |
1187 | fi; \ | |
729e4ab9 | 1188 | fi; \ |
b75a7d8f | 1189 | fi; |
73c04bcf A |
1190 | |
1191 | DEPEND_install_debug = debug | |
1192 | DEPEND_install_profile = profile | |
1193 | ||
1194 | .SECONDEXPANSION: | |
1195 | install_debug install_profile : $$(DEPEND_$$@) | |
73c04bcf | 1196 | if test "$(WINDOWS)" = "YES"; then \ |
51004dcb A |
1197 | if test ! -d $(DEST_ROOT)$(winprogdir)/; then \ |
1198 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winprogdir)/; \ | |
73c04bcf | 1199 | fi; \ |
51004dcb A |
1200 | if test ! -d $(DEST_ROOT)$(winintlibdir)/; then \ |
1201 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winintlibdir)/; \ | |
1202 | fi; \ | |
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; \ | |
73c04bcf | 1209 | else \ |
51004dcb A |
1210 | if test ! -d $(DEST_ROOT)$(libdir)/; then \ |
1211 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \ | |
1212 | fi; \ | |
1213 | $(INSTALL) -b -m 0664 $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ | |
729e4ab9 | 1214 | if test "$(LINUX)" = "YES"; then \ |
51004dcb | 1215 | cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
729e4ab9 A |
1216 | strip -x -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
1217 | else \ | |
1218 | (cd $(DEST_ROOT)$(libdir); \ | |
1219 | ln -fs $($(INSTALLED_DYLIB_$(DEPEND_$@))) $($(DYLIB_$(DEPEND_$@)))); \ | |
51004dcb | 1220 | cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
4388f060 | 1221 | $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
51004dcb | 1222 | fi; \ |
73c04bcf | 1223 | for subdir in $(EXTRA_LIBS); do \ |
51004dcb | 1224 | (cd $(OBJROOT_CURRENT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \ |
73c04bcf | 1225 | done; \ |
b75a7d8f | 1226 | fi; |
b75a7d8f | 1227 | |
374ca955 A |
1228 | clean : |
1229 | -rm -rf $(OBJROOT) | |
73c04bcf | 1230 |