]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | ## |
46f4442e | 2 | # Wrapper makefile for ICU |
4388f060 | 3 | # Copyright (C) 2003-2012 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 | # | |
8 | ## | |
9 | ||
10 | ################################# | |
11 | ################################# | |
12 | # MAKE VARS | |
13 | ################################# | |
14 | ################################# | |
15 | ||
16 | # ':=' denotes a "simply expanded" variable. It's value is | |
17 | # set at the time of definition and it never recursively expands | |
18 | # when used. This is in contrast to using '=' which denotes a | |
19 | # recursively expanded variable. | |
20 | ||
21 | SHELL := /bin/sh | |
22 | ||
23 | # Sane defaults, which are typically overridden on the command line. | |
73c04bcf | 24 | WINDOWS=NO |
729e4ab9 A |
25 | LINUX=NO |
26 | ARCH64=NO | |
27 | ||
374ca955 A |
28 | SRCROOT=$(shell pwd) |
29 | OBJROOT=$(SRCROOT)/build | |
30 | DSTROOT=$(OBJROOT) | |
b75a7d8f | 31 | SYMROOT=$(OBJROOT) |
729e4ab9 | 32 | CROSSHOST_OBJROOT=$(OBJROOT)/crossbuildhost |
b75a7d8f A |
33 | APPLE_INTERNAL_DIR=/AppleInternal |
34 | RC_ARCHS= | |
729e4ab9 | 35 | MAC_OS_X_VERSION_MIN_REQUIRED=1060 |
4388f060 A |
36 | OSX_HOST_VERSION_MIN_STRING=10.7 |
37 | IOS_VERSION_TARGET_STRING=6.0 | |
38 | OSX_VERSION_TARGET_STRING=10.8 | |
729e4ab9 A |
39 | |
40 | UNAME_PROCESSOR=$(shell uname -p) | |
41 | ifneq "$(RC_ARCHS)" "" | |
42 | ifneq "$(SDKROOT)" "" | |
43 | CROSS_BUILD=YES | |
44 | else ifeq "$(RC_INDIGO)" "YES" | |
45 | CROSS_BUILD=YES | |
46 | else | |
47 | CROSS_BUILD=NO | |
48 | endif | |
49 | INSTALLHDRS_ARCH=-arch $(shell echo $(RC_ARCHS) | cut -d' ' -f1) | |
73c04bcf | 50 | else |
729e4ab9 A |
51 | CROSS_BUILD=NO |
52 | INSTALLHDRS_ARCH= | |
73c04bcf | 53 | endif |
729e4ab9 A |
54 | $(info # RC_ARCHS=$(RC_ARCHS)) |
55 | $(info # INSTALLHDRS_ARCH=$(INSTALLHDRS_ARCH)) | |
56 | $(info # buildhost=$(UNAME_PROCESSOR)) | |
57 | ||
58 | # FORCEENDIAN below is to override silly configure behavior in which if | |
59 | # __APPLE_CC__ is defined and archs are in { ppc, ppc64, i386, x86_64 } | |
60 | # then it assumes a universal build (ac_cv_c_bigendian=universal) with | |
61 | # data file initially built big-endian. | |
62 | # | |
63 | ifeq "$(CROSS_BUILD)" "YES" | |
64 | RC_ARCHS_FIRST=$(shell echo $(RC_ARCHS) | cut -d' ' -f1) | |
65 | TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin10.0.0 | |
66 | ENV_CONFIGURE_ARCHS=$(RC_ARCHS:%=-arch %) | |
67 | ICUPKGTOOLIBS="$(CROSSHOST_OBJROOT)/lib:$(CROSSHOST_OBJROOT)/stubdata" | |
68 | ICUPKGTOOL=$(CROSSHOST_OBJROOT)/bin/icupkg | |
69 | ifeq "$(filter-out i386 x86_64,$(RC_ARCHS))" "" | |
70 | FORCEENDIAN= ac_cv_c_bigendian=no | |
71 | else | |
72 | FORCEENDIAN= | |
73 | endif | |
74 | else ifeq "$(LINUX)" "YES" | |
75 | TARGET_SPEC=$(UNAME_PROCESSOR)-unknown-linux-gnu | |
76 | ENV_CONFIGURE_ARCHS= | |
77 | ICUPKGTOOLIBS="$(OBJROOT)/lib:$(OBJROOT)/stubdata" | |
78 | ICUPKGTOOL=$(OBJROOT)/bin/icupkg | |
79 | FORCEENDIAN= | |
46f4442e | 80 | else |
729e4ab9 A |
81 | TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin10.0.0 |
82 | ENV_CONFIGURE_ARCHS= | |
83 | ICUPKGTOOLIBS="$(OBJROOT)/lib:$(OBJROOT)/stubdata" | |
84 | ICUPKGTOOL=$(OBJROOT)/bin/icupkg | |
85 | FORCEENDIAN= | |
46f4442e | 86 | endif |
729e4ab9 A |
87 | $(info # TARGET_SPEC=$(TARGET_SPEC)) |
88 | $(info # ENV_CONFIGURE_ARCHS=$(ENV_CONFIGURE_ARCHS)) | |
46f4442e A |
89 | |
90 | ifeq "$(RC_INDIGO)" "YES" | |
4388f060 | 91 | -include $(DEVELOPER_DIR)/AppleInternal/Makefiles/Makefile.indigo |
46f4442e A |
92 | ifndef SDKROOT |
93 | SDKROOT=$(INDIGO_PREFIX) | |
94 | endif | |
95 | DEST_ROOT=$(DSTROOT)/$(INDIGO_PREFIX)/ | |
73c04bcf | 96 | else |
46f4442e A |
97 | DEST_ROOT=$(DSTROOT) |
98 | endif | |
729e4ab9 A |
99 | $(info # SDKROOT=$(SDKROOT)) |
100 | $(info # RC_INDIGO=$(RC_INDIGO)) | |
101 | $(info # CROSS_BUILD=$(CROSS_BUILD)) | |
4388f060 A |
102 | $(info # DSTROOT=$(DSTROOT)) |
103 | $(info # DEST_ROOT=$(DEST_ROOT)) | |
46f4442e | 104 | |
4388f060 | 105 | ICU_TARGET_VERSION_FOR_TZ_EXTRA := |
729e4ab9 A |
106 | ifeq "$(filter arm armv6 armv7,$(RC_ARCHS))" "" |
107 | THUMB_FLAG = | |
108 | ifneq "$(SDKROOT)" "" | |
4388f060 | 109 | ICU_TARGET_VERSION_FOR_TZ_EXTRA := -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) |
46f4442e A |
110 | endif |
111 | else | |
729e4ab9 A |
112 | THUMB_FLAG = -mthumb |
113 | endif | |
114 | ||
115 | # even for a crossbuild host build, we want to use the target's tzdata | |
116 | export TZDATA:=$(lastword $(wildcard $(SDKROOT)/usr/local/share/tz/tzdata*.tar.gz)) | |
117 | $(info # TZDATA=$(TZDATA)) | |
118 | ||
119 | ifeq "$(WINDOWS)" "YES" | |
120 | EMBEDDED:=0 | |
121 | else ifeq "$(LINUX)" "YES" | |
122 | CC := gcc | |
123 | CXX := g++ | |
46f4442e | 124 | EMBEDDED:=0 |
729e4ab9 A |
125 | ISYSROOT = |
126 | else ifeq "$(SDKROOT)" "" | |
4388f060 A |
127 | CC := $(shell xcrun -find cc) |
128 | CXX := $(shell xcrun -find c++) | |
129 | NM := $(shell xcrun -find nm) | |
130 | STRIPCMD := $(shell xcrun -find strip) | |
729e4ab9 A |
131 | EMBEDDED:=$(shell $(CXX) -E -dM -x c -include TargetConditionals.h /dev/null | fgrep TARGET_OS_EMBEDDED | cut -d' ' -f3) |
132 | ISYSROOT = | |
133 | else | |
4388f060 A |
134 | CC := $(shell xcrun -sdk $(SDKROOT) -find cc) |
135 | CXX := $(shell xcrun -sdk $(SDKROOT) -find c++) | |
136 | NM := $(shell xcrun -sdk $(SDKROOT) -find nm) | |
137 | STRIPCMD := $(shell xcrun -sdk $(SDKROOT) -find strip) | |
729e4ab9 A |
138 | EMBEDDED:=$(shell $(CXX) -E -dM -x c -isysroot $(SDKROOT) -include TargetConditionals.h /dev/null | fgrep TARGET_OS_EMBEDDED | cut -d' ' -f3) |
139 | ISYSROOT:= -isysroot $(SDKROOT) | |
46f4442e | 140 | endif |
4388f060 A |
141 | $(info # CC=$(CC)) |
142 | $(info # CXX=$(CXX)) | |
46f4442e A |
143 | |
144 | ifeq "$(EMBEDDED)" "1" | |
145 | export APPLE_EMBEDDED=YES | |
729e4ab9 | 146 | DISABLE_DRAFT=YES |
46f4442e A |
147 | else ifeq "$(RC_INDIGO)" "YES" |
148 | export APPLE_EMBEDDED=YES | |
729e4ab9 | 149 | DISABLE_DRAFT=YES |
46f4442e A |
150 | else |
151 | export APPLE_EMBEDDED=NO | |
729e4ab9 A |
152 | DISABLE_DRAFT=NO |
153 | endif | |
154 | ||
4388f060 A |
155 | ifeq "$(APPLE_EMBEDDED)" "YES" |
156 | ICU_TARGET_VERSION := -miphoneos-version-min=$(IOS_VERSION_TARGET_STRING) | |
157 | else | |
158 | ICU_TARGET_VERSION := | |
159 | endif | |
160 | $(info # ICU_TARGET_VERSION=$(ICU_TARGET_VERSION)) | |
161 | ||
729e4ab9 A |
162 | ifeq "$(DISABLE_DRAFT)" "YES" |
163 | DRAFT_FLAG=--disable-draft | |
164 | else | |
165 | DRAFT_FLAG= | |
73c04bcf A |
166 | endif |
167 | ||
168 | ifndef RC_ProjectSourceVersion | |
169 | ifdef RC_PROJECTSOURCEVERSION | |
170 | RC_ProjectSourceVersion=$(RC_PROJECTSOURCEVERSION) | |
171 | endif | |
172 | endif | |
173 | ||
729e4ab9 A |
174 | # An Apple submission version (passed in RC_ProjectSourceVersion for official builds) is |
175 | # X[.Y[.Z]] | |
176 | # where X is in range 0-214747, Y and Z are in range 0-99 (with no leading zeros). | |
177 | # The value for the SourceVersion property in version.plists will be calculated as | |
178 | # (X*10000 + Y*100 + Z). So we want U_ICU_VERSION_BUILDLEVEL_NUM to be Y*100 + Z | |
73c04bcf A |
179 | ifneq "$(RC_ProjectSourceVersion)" "" |
180 | ifeq "$(WINDOWS)" "YES" | |
729e4ab9 A |
181 | ICU_BUILD_Y := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\3/') |
182 | ICU_BUILD_Z1 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\5/') | |
183 | ICU_BUILD_Z2 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\6/') | |
73c04bcf | 184 | else |
729e4ab9 A |
185 | ICU_BUILD_Y := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\3/') |
186 | ICU_BUILD_Z1 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\5/') | |
187 | ICU_BUILD_Z2 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)(\.([0-9]{1,2})(\.([0-9])([0-9])?)?)?/\6/') | |
188 | endif | |
189 | ifeq "$(ICU_BUILD_Y)" "" | |
190 | ICU_BUILD := 0 | |
191 | else | |
192 | ICU_BUILD := $(subst a,$(ICU_BUILD_Y),abc) | |
193 | ifeq "$(ICU_BUILD_Z1)" "" | |
194 | ICU_BUILD := $(subst b,0,$(ICU_BUILD)) | |
195 | ICU_BUILD := $(subst c,0,$(ICU_BUILD)) | |
196 | else | |
197 | ifeq "$(ICU_BUILD_Z2)" "" | |
198 | ICU_BUILD := $(subst b,0,$(ICU_BUILD)) | |
199 | ICU_BUILD := $(subst c,$(ICU_BUILD_Z1),$(ICU_BUILD)) | |
200 | else | |
201 | ICU_BUILD := $(subst b,$(ICU_BUILD_Z1),$(ICU_BUILD)) | |
202 | ICU_BUILD := $(subst c,$(ICU_BUILD_Z2),$(ICU_BUILD)) | |
203 | endif | |
204 | endif | |
73c04bcf A |
205 | endif |
206 | else | |
207 | ICU_BUILD := 0 | |
208 | endif | |
729e4ab9 | 209 | $(info # ICU_BUILD=$(ICU_BUILD)) |
b75a7d8f | 210 | |
374ca955 A |
211 | # Disallow $(SRCROOT) == $(OBJROOT) |
212 | ifeq ($(OBJROOT), $(SRCROOT)) | |
213 | $(error SRCROOT same as OBJROOT) | |
214 | endif | |
b75a7d8f | 215 | |
729e4ab9 A |
216 | # Disallow cross builds on Windows/Linux for now |
217 | # (since those builds are not out-of-source as required for cross-builds) | |
218 | ifeq "$(CROSS_BUILD)" "YES" | |
219 | ifeq "$(WINDOWS)" "YES" | |
220 | $(error Cross-builds currently not allowed on Windows) | |
221 | endif | |
222 | ifeq "$(LINUX)" "YES" | |
223 | $(error Cross-builds currently not allowed on Linux) | |
224 | endif | |
225 | endif | |
226 | ||
b75a7d8f A |
227 | ################################# |
228 | # Headers | |
229 | ################################# | |
230 | ||
231 | # For installhdrs. Not every compiled module has an associated header. Normally, | |
232 | # ICU installs headers as a sub-targe of the install target. But since we only want | |
233 | # certain libraries to install (and since we link all of our own .o modules), we need | |
234 | # invoke the headers targets ourselves. This may be problematic because there isn't a | |
235 | # good way to dist-clean afterwards...we need to do explicit dist-cleans, especially if | |
236 | # install the extra libraries. | |
237 | ||
238 | EXTRA_HDRS = | |
239 | # EXTRA_HDRS = ./extra/ustdio/ ./layout/ | |
46f4442e | 240 | ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
241 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) |
242 | else ifeq "$(WINDOWS)" "YES" | |
243 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ $(EXTRA_HDRS) | |
244 | else | |
245 | HDR_MAKE_SUBDIR = ./common/ ./i18n/ ./io/ $(EXTRA_HDRS) | |
246 | endif | |
247 | ifeq "$(WINDOWS)" "YES" | |
73c04bcf | 248 | PRIVATE_HDR_PREFIX=$(APPLE_INTERNAL_DIR) |
729e4ab9 | 249 | else ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
250 | HDR_PREFIX=/usr |
251 | PRIVATE_HDR_PREFIX=/usr/local | |
729e4ab9 A |
252 | else |
253 | PRIVATE_HDR_PREFIX=/usr/local | |
73c04bcf | 254 | endif |
b75a7d8f A |
255 | |
256 | ################################# | |
257 | # Install | |
258 | ################################# | |
259 | ||
260 | # For install. We currently don't install EXTRA_LIBS. We also don't install the data | |
261 | # directly into the ICU library. It is now installed at /usr/share/icu/*.dat. Thus we | |
262 | # don't use DATA_OBJ anymore. This could change if we decide to move the data back into | |
263 | # the icucore monolithic library. | |
264 | ||
265 | INSTALL = /usr/bin/install | |
266 | COMMON_OBJ = ./common/*.o | |
267 | I18N_OBJ = ./i18n/*.o | |
73c04bcf | 268 | IO_OBJ = ./io/*.o |
b75a7d8f A |
269 | STUB_DATA_OBJ = ./stubdata/*.o |
270 | EXTRA_LIBS = | |
271 | #EXTRA_LIBS =./extra/ ./layout/ ./tools/ctestfw/ ./tools/toolutil/ | |
272 | #DATA_OBJ = ./data/out/build/*.o | |
46f4442e | 273 | ifeq "$(APPLE_EMBEDDED)" "YES" |
73c04bcf A |
274 | DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(STUB_DATA_OBJ) |
275 | else ifeq "$(WINDOWS)" "YES" | |
276 | DYLIB_OBJS=$(COMMON_OBJ) ./common/common.res $(I18N_OBJ) $(STUB_DATA_OBJ) | |
277 | else | |
278 | DYLIB_OBJS=$(COMMON_OBJ) $(I18N_OBJ) $(IO_OBJ) $(STUB_DATA_OBJ) | |
279 | endif | |
b75a7d8f | 280 | |
46f4442e A |
281 | ################################# |
282 | # Sources | |
283 | ################################# | |
284 | ||
285 | # For installsrc (B&I) | |
286 | # Note that installsrc is run on the system from which ICU is submitted, which | |
287 | # may be a different environment than the one for a which a build is targeted. | |
288 | ||
729e4ab9 | 289 | INSTALLSRC_VARFILES=./ICU_embedded.order ./minimalapis.txt ./minimalapisTest.c ./minimalpatchconfig.txt ./windowspatchconfig.txt ./patchconfig.txt ./crosshostpatchconfig.txt |
46f4442e | 290 | |
b75a7d8f A |
291 | ################################# |
292 | # Cleaning | |
293 | ################################# | |
294 | ||
295 | #We need to clean after installing. | |
296 | ||
297 | EXTRA_CLEAN = | |
298 | ||
299 | # Some directories aren't cleaned recursively. Clean them manually... | |
300 | MANUAL_CLEAN_TOOLS = ./tools/dumpce | |
301 | MANUAL_CLEAN_EXTRA = ./extra/scrptrun ./samples/layout ./extra/ustdio ./extra | |
302 | MANUAL_CLEAN_TEST = ./test/collperf ./test/iotest ./test/letest ./test/thaitest ./test/threadtest ./test/testmap ./test | |
303 | MANUAL_CLEAN_SAMPLE = ./samples/layout ./samples | |
304 | ||
73c04bcf | 305 | CLEAN_SUBDIR = ./stubdata ./common ./i18n ./io ./layout ./layoutex ./data ./tools ./$(MANUAL_CLEAN_TOOLS) $(MANUAL_CLEAN_EXTRA) $(MANUAL_CLEAN_TEST) $(MANUAL_CLEAN_SAMPLE) |
b75a7d8f A |
306 | |
307 | ################################# | |
308 | # Config flags | |
309 | ################################# | |
310 | ||
729e4ab9 A |
311 | ifeq "$(WINDOWS)" "YES" |
312 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \ | |
313 | --with-data-packaging=library --prefix=$(PRIVATE_HDR_PREFIX) \ | |
73c04bcf | 314 | $(DRAFT_FLAG) |
729e4ab9 A |
315 | else ifeq "$(LINUX)" "YES" |
316 | ifeq "$(ARCH64)" "YES" | |
317 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
318 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=64 \ | |
319 | $(DRAFT_FLAG) | |
320 | else | |
321 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ | |
322 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) --with-library-bits=32 \ | |
323 | $(DRAFT_FLAG) | |
324 | endif | |
325 | else ifeq "$(APPLE_EMBEDDED)" "YES" | |
326 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples --disable-icuio \ | |
327 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \ | |
4388f060 | 328 | $(DRAFT_FLAG) |
73c04bcf | 329 | else |
729e4ab9 A |
330 | CONFIG_FLAGS = --disable-renaming --disable-extras --disable-layout --disable-samples \ |
331 | --with-data-packaging=archive --prefix=$(PRIVATE_HDR_PREFIX) \ | |
4388f060 | 332 | $(DRAFT_FLAG) |
73c04bcf | 333 | endif |
b75a7d8f A |
334 | |
335 | ################################# | |
336 | # Install paths | |
337 | ################################# | |
338 | ||
339 | # This may or may not be an appropriate name for the icu dylib. This naming scheme is | |
340 | # an attempt to follow the icu convention in naming the dylib and then having symbolic | |
341 | # links of easier to remember library names point it it. *UPDATE* the version and | |
342 | # sub-version variables as needed. The Core version should be 'A' until the core | |
343 | # version changes it's API...that is a new version isn't backwards compatible. | |
344 | # The ICU version/subversion should reflect the actual ICU version. | |
345 | ||
374ca955 | 346 | LIB_NAME = icucore |
4388f060 | 347 | ICU_VERS = 49 |
729e4ab9 | 348 | ICU_SUBVERS = 1 |
b75a7d8f | 349 | CORE_VERS = A |
b75a7d8f | 350 | |
73c04bcf A |
351 | ifeq "$(WINDOWS)" "YES" |
352 | DYLIB_SUFF = dll | |
353 | libdir = /AppleInternal/bin/ | |
354 | winlibdir = /AppleInternal/lib/ | |
729e4ab9 A |
355 | else ifeq "$(LINUX)" "YES" |
356 | DYLIB_SUFF = so | |
357 | ifeq "$(ARCH64)" "YES" | |
358 | libdir = /usr/lib64/ | |
359 | else | |
360 | libdir = /usr/lib/ | |
361 | endif | |
362 | winlibdir = | |
73c04bcf A |
363 | else |
364 | DYLIB_SUFF = dylib | |
365 | libdir = /usr/lib/ | |
366 | winlibdir = | |
367 | endif | |
368 | ||
374ca955 | 369 | DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF) |
73c04bcf A |
370 | DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF) |
371 | DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF) | |
372 | ifeq "$(WINDOWS)" "YES" | |
373 | INSTALLED_DYLIB = $(LIB_NAME).$(DYLIB_SUFF) | |
374 | INSTALLED_DYLIB_DEBUG = $(LIB_NAME)_debug.$(DYLIB_SUFF) | |
375 | INSTALLED_DYLIB_PROFILE = $(LIB_NAME)_profile.$(DYLIB_SUFF) | |
729e4ab9 A |
376 | else ifeq "$(LINUX)" "YES" |
377 | INSTALLED_DYLIB = lib$(LIB_NAME).$(DYLIB_SUFF) | |
378 | INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME)_debug.$(DYLIB_SUFF) | |
379 | INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME)_profile.$(DYLIB_SUFF) | |
73c04bcf A |
380 | else |
381 | INSTALLED_DYLIB = lib$(LIB_NAME).$(CORE_VERS).$(DYLIB_SUFF) | |
382 | INSTALLED_DYLIB_DEBUG = lib$(LIB_NAME).$(CORE_VERS)_debug.$(DYLIB_SUFF) | |
383 | INSTALLED_DYLIB_PROFILE = lib$(LIB_NAME).$(CORE_VERS)_profile.$(DYLIB_SUFF) | |
384 | endif | |
385 | ||
386 | INSTALLED_DYLIB_icu = INSTALLED_DYLIB | |
387 | INSTALLED_DYLIB_debug = INSTALLED_DYLIB_DEBUG | |
388 | INSTALLED_DYLIB_profile = INSTALLED_DYLIB_PROFILE | |
389 | DYLIB_icu = DYLIB | |
390 | DYLIB_debug = DYLIB_DEBUG | |
391 | DYLIB_profile = DYLIB_PROFILE | |
b75a7d8f A |
392 | |
393 | ################################# | |
394 | # Data files | |
395 | ################################# | |
396 | ||
397 | datadir=/usr/share/icu/ | |
374ca955 A |
398 | OPEN_SOURCE_VERSIONS_DIR=/usr/local/OpenSourceVersions/ |
399 | OPEN_SOURCE_LICENSES_DIR=/usr/local/OpenSourceLicenses/ | |
400 | ICU_DATA_DIR= data/out | |
b75a7d8f A |
401 | B_DATA_FILE=icudt$(ICU_VERS)b.dat |
402 | L_DATA_FILE=icudt$(ICU_VERS)l.dat | |
403 | ||
729e4ab9 A |
404 | ################################# |
405 | # Info tool | |
406 | ################################# | |
407 | ||
408 | localtooldir=/usr/local/bin/ | |
409 | ||
410 | INFOTOOL = icuinfo | |
411 | ||
412 | INFOTOOL_OBJS = ./tools/icuinfo/icuinfo.o ./tools/toolutil/udbgutil.o ./tools/toolutil/uoptions.o | |
413 | ||
374ca955 A |
414 | ################################# |
415 | # Environment variables | |
416 | ################################# | |
417 | ||
418 | # $(RC_ARCHS:%=-arch %) is a substitution reference. It denotes, in this case, | |
419 | # for every value <val> in RC_ARCHS, replace it with "-arch <val>". Substitution | |
420 | # references have the form $(var:a=b). We can insert the strip and prebinding commands | |
421 | # into CFLAGS (and CXXFLAGS). This controls a lot of the external variables so we don't | |
422 | # need to directly modify the ICU files (like for CFLAGS, etc). | |
423 | ||
424 | LIBOVERRIDES=LIBICUDT="-L$(OBJROOT) -l$(LIB_NAME)" \ | |
425 | LIBICUUC="-L$(OBJROOT) -l$(LIB_NAME)" \ | |
426 | LIBICUI18N="-L$(OBJROOT) -l$(LIB_NAME)" | |
427 | ||
46f4442e A |
428 | # For normal Windows builds set the ENV= options here; for debug Windows builds set the ENV_DEBUG= |
429 | # options here and also the update the LINK.EXE lines in the TARGETS section below. | |
73c04bcf | 430 | ifeq "$(WINDOWS)" "YES" |
729e4ab9 | 431 | export TZ_EXTRA_CXXFLAGS:= |
73c04bcf | 432 | ifeq "$(ICU_BUILD)" "0" |
729e4ab9 | 433 | CPPOPTIONS = CPPFLAGS="-DU_DISABLE_RENAMING=1" |
73c04bcf | 434 | else |
729e4ab9 | 435 | CPPOPTIONS = CPPFLAGS="-DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD)" |
73c04bcf | 436 | endif |
729e4ab9 | 437 | ENV= CFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" CXXFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" LDFLAGS="/NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF" |
46f4442e | 438 | ENV_CONFIGURE= $(CPPOPTIONS) CFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" CXXFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" |
729e4ab9 | 439 | ENV_DEBUG= CFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" CXXFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc" LDFLAGS="/DEBUG /DYNAMICBASE" |
73c04bcf | 440 | ENV_PROFILE= |
729e4ab9 A |
441 | else ifeq "$(LINUX)" "YES" |
442 | export TZ_EXTRA_CXXFLAGS:= | |
443 | ifeq "$(ICU_BUILD)" "0" | |
444 | CPPOPTIONS = CPPFLAGS="-DU_DISABLE_RENAMING=1" | |
445 | else | |
446 | CPPOPTIONS = CPPFLAGS="-DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD)" | |
447 | endif | |
448 | ifeq "$(ARCH64)" "YES" | |
449 | ENV_CONFIGURE= $(CPPOPTIONS) APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
450 | CC="$(CC)" \ | |
451 | CXX="$(CXX)" \ | |
452 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \ | |
453 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
454 | TZDATA="$(TZDATA)" \ | |
455 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib64" | |
456 | ||
457 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
458 | CC="$(CC)" \ | |
459 | CXX="$(CXX)" \ | |
460 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \ | |
461 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
462 | TZDATA="$(TZDATA)" \ | |
463 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib64" | |
464 | ||
465 | ENV_DEBUG = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
466 | CC="$(CC)" \ | |
467 | CXX="$(CXX)" \ | |
468 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden" \ | |
469 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
470 | TZDATA="$(TZDATA)" \ | |
471 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib64" | |
472 | ||
473 | ENV_PROFILE = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
474 | CC="$(CC)" \ | |
475 | CXX="$(CXX)" \ | |
476 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden" \ | |
477 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
478 | TZDATA="$(TZDATA)" \ | |
479 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib64" | |
480 | else | |
481 | ENV_CONFIGURE= $(CPPOPTIONS) APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
482 | CC="$(CC)" \ | |
483 | CXX="$(CXX)" \ | |
484 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \ | |
485 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
486 | TZDATA="$(TZDATA)" \ | |
487 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
488 | ||
489 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
490 | CC="$(CC)" \ | |
491 | CXX="$(CXX)" \ | |
492 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \ | |
493 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
494 | TZDATA="$(TZDATA)" \ | |
495 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
496 | ||
497 | ENV_DEBUG = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
498 | CC="$(CC)" \ | |
499 | CXX="$(CXX)" \ | |
500 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden" \ | |
501 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
502 | TZDATA="$(TZDATA)" \ | |
503 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
504 | ||
505 | ENV_PROFILE = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
506 | CC="$(CC)" \ | |
507 | CXX="$(CXX)" \ | |
508 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden" \ | |
509 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
510 | TZDATA="$(TZDATA)" \ | |
511 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
512 | endif | |
73c04bcf | 513 | else |
4388f060 | 514 | export TZ_EXTRA_CXXFLAGS:=-DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) $(ICU_TARGET_VERSION_FOR_TZ_EXTRA) |
73c04bcf | 515 | ifeq "$(ICU_BUILD)" "0" |
729e4ab9 | 516 | CPPOPTIONS = CPPFLAGS="-DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED)" |
73c04bcf | 517 | else |
729e4ab9 | 518 | CPPOPTIONS = CPPFLAGS="-DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) -DSTD_INSPIRED -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED)" |
73c04bcf | 519 | endif |
729e4ab9 A |
520 | ENV_CONFIGURE= $(CPPOPTIONS) APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
521 | CC="$(CC)" \ | |
522 | CXX="$(CXX)" \ | |
4388f060 A |
523 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
524 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ | |
729e4ab9 A |
525 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
526 | RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\ | |
527 | TZDATA="$(TZDATA)" \ | |
528 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
529 | ||
73c04bcf | 530 | ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
729e4ab9 A |
531 | CC="$(CC)" \ |
532 | CXX="$(CXX)" \ | |
4388f060 A |
533 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
534 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ | |
729e4ab9 | 535 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
73c04bcf A |
536 | RC_ARCHS="$(RC_ARCHS)" \ |
537 | TZDATA="$(TZDATA)" \ | |
46f4442e | 538 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" |
73c04bcf | 539 | |
729e4ab9 A |
540 | ENV_DEBUG = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
541 | CC="$(CC)" \ | |
542 | CXX="$(CXX)" \ | |
4388f060 A |
543 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
544 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ | |
729e4ab9 | 545 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
73c04bcf A |
546 | RC_ARCHS="$(RC_ARCHS)" \ |
547 | TZDATA="$(TZDATA)" \ | |
46f4442e | 548 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" |
73c04bcf | 549 | |
729e4ab9 A |
550 | ENV_PROFILE = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
551 | CC="$(CC)" \ | |
552 | CXX="$(CXX)" \ | |
4388f060 A |
553 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \ |
554 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \ | |
729e4ab9 | 555 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
73c04bcf A |
556 | RC_ARCHS="$(RC_ARCHS)" \ |
557 | TZDATA="$(TZDATA)" \ | |
46f4442e | 558 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" |
729e4ab9 A |
559 | |
560 | ENV_CONFIGURE_BUILDHOST = $(CPPOPTIONS) APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ | |
4388f060 A |
561 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ |
562 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
729e4ab9 A |
563 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
564 | TZDATA="$(TZDATA)" \ | |
565 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" | |
73c04bcf | 566 | |
729e4ab9 | 567 | ENV_BUILDHOST = APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \ |
4388f060 A |
568 | CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \ |
569 | CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"/usr/share/icu/\\\"\" -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \ | |
729e4ab9 | 570 | TZ_EXTRA_CXXFLAGS="$(TZ_EXTRA_CXXFLAGS)" \ |
73c04bcf | 571 | TZDATA="$(TZDATA)" \ |
46f4442e | 572 | DYLD_LIBRARY_PATH="$(DEST_ROOT)/usr/local/lib" |
729e4ab9 | 573 | |
73c04bcf | 574 | endif |
374ca955 | 575 | |
374ca955 A |
576 | ENV_icu = ENV |
577 | ENV_debug = ENV_DEBUG | |
73c04bcf | 578 | ENV_profile = ENV_PROFILE |
374ca955 | 579 | |
46f4442e A |
580 | ifeq "$(APPLE_EMBEDDED)" "YES" |
581 | ORDERFILE=$(SRCROOT)/ICU_embedded.order | |
582 | else | |
583 | ORDERFILE=/usr/local/lib/OrderFiles/libicucore.order | |
584 | endif | |
374ca955 A |
585 | ifeq "$(shell test -f $(ORDERFILE) && echo YES )" "YES" |
586 | SECTORDER_FLAGS=-sectorder __TEXT __text $(ORDERFILE) | |
587 | else | |
588 | SECTORDER_FLAGS= | |
589 | endif | |
590 | ||
591 | ||
b75a7d8f A |
592 | ################################# |
593 | ################################# | |
594 | # TARGETS | |
595 | ################################# | |
596 | ################################# | |
374ca955 | 597 | |
729e4ab9 | 598 | .PHONY : icu check installsrc installhdrs installhdrsint clean install debug debug-install crossbuildhost |
374ca955 A |
599 | .DELETE_ON_ERROR : |
600 | ||
73c04bcf | 601 | icu debug profile : $(OBJROOT)/Makefile |
374ca955 A |
602 | (cd $(OBJROOT); \ |
603 | $(MAKE) $($(ENV_$@)); \ | |
73c04bcf | 604 | if test "$(WINDOWS)" = "YES"; then \ |
729e4ab9 A |
605 | (cd common; \ |
606 | rc.exe /folibicuuc.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \ | |
607 | "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 libicuuc.rc; \ | |
608 | ); \ | |
609 | (cd i18n; \ | |
610 | rc.exe /folibicuin.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common libicuin.rc; \ | |
611 | ); \ | |
73c04bcf A |
612 | if test "$@" = "debug"; then \ |
613 | (cd common; \ | |
729e4ab9 A |
614 | LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a800000" /DYNAMICBASE /DEBUG \ |
615 | /IMPLIB:../lib/libicuuc_$@.lib /out:../lib/libicuuc_$@.dll \ | |
616 | *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \ | |
617 | ); \ | |
73c04bcf | 618 | (cd i18n; \ |
729e4ab9 A |
619 | LINK.EXE /subsystem:console /DLL /nologo /base:"0x4a900000" /DYNAMICBASE /DEBUG \ |
620 | /IMPLIB:../lib/libicuin_$@.lib /out:../lib/libicuin_$@.dll \ | |
621 | *.o libicuin.res ../lib/libicuuc_$@.lib ../stubdata/icudt.lib advapi32.lib; \ | |
622 | ); \ | |
623 | else \ | |
624 | mkdir -p lib/shim; \ | |
625 | (cd common; \ | |
626 | rm -f icuuc40shim.o; \ | |
627 | rm -f ../lib/libicuuc.dll.manifest; \ | |
628 | rm -f ../lib/icuuc40.dll.manifest; \ | |
4388f060 | 629 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ |
729e4ab9 A |
630 | /IMPLIB:../lib/libicuuc.lib /out:../lib/libicuuc.dll \ |
631 | *.o libicuuc.res ../stubdata/icudt.lib advapi32.lib; \ | |
632 | mt.exe -nologo -manifest ../lib/libicuuc.dll.manifest -outputresource:"../lib/libicuuc.dll;2"; \ | |
633 | cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \ | |
634 | -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \ | |
635 | -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_COMMON_IMPLEMENTATION \ | |
636 | /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \ | |
637 | /c /Foicuuc40shim.o icuuc40shim.cpp; \ | |
638 | rc.exe /foicuuc40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \ | |
639 | "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuuc40shim.rc; \ | |
4388f060 | 640 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ |
729e4ab9 A |
641 | /IMPLIB:../lib/shim/icuuc.lib /out:../lib/icuuc40.dll \ |
642 | icuuc40shim.o icuuc40shim.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \ | |
643 | mt.exe -nologo -manifest ../lib/icuuc40.dll.manifest -outputresource:"../lib/icuuc40.dll;2"; \ | |
644 | ); \ | |
645 | (cd i18n; \ | |
646 | rm -f icuin40shim.o; \ | |
647 | rm -f ../lib/libicuin.dll.manifest; \ | |
648 | rm -f ../lib/icuin40.dll.manifest; \ | |
4388f060 | 649 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ |
729e4ab9 A |
650 | /IMPLIB:../lib/libicuin.lib /out:../lib/libicuin.dll \ |
651 | *.o libicuin.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \ | |
652 | mt.exe -nologo -manifest ../lib/libicuin.dll.manifest -outputresource:"../lib/libicuin.dll;2"; \ | |
653 | cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \ | |
654 | -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \ | |
655 | -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_I18N_IMPLEMENTATION \ | |
656 | /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \ | |
657 | /c /Foicuin40shim.o icuin40shim.cpp; \ | |
658 | rc.exe /foicuin40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \ | |
659 | "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuin40shim.rc; \ | |
4388f060 | 660 | LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \ |
729e4ab9 A |
661 | /IMPLIB:../lib/shim/icuin.lib /out:../lib/icuin40.dll \ |
662 | icuin40shim.o icuin40shim.res ../lib/libicuin.lib ../stubdata/icudt.lib advapi32.lib; \ | |
663 | mt.exe -nologo -manifest ../lib/icuin40.dll.manifest -outputresource:"../lib/icuin40.dll;2"; \ | |
664 | ); \ | |
73c04bcf | 665 | fi; \ |
374ca955 | 666 | else \ |
729e4ab9 A |
667 | if test "$(LINUX)" = "YES"; then \ |
668 | if test "$(ARCH64)" = "YES"; then \ | |
669 | $($(ENV_$@)) $(CXX) \ | |
670 | -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \ | |
671 | $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -Wl,-L/usr/lib64/ -ldl \ | |
672 | -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ | |
673 | else \ | |
674 | $($(ENV_$@)) $(CXX) \ | |
675 | -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden \ | |
676 | $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname,$($(INSTALLED_DYLIB_$@)) -ldl \ | |
677 | -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ | |
678 | fi; \ | |
679 | else \ | |
680 | tmpfile=`mktemp -t weakexternal.XXXXXX` || exit 1; \ | |
4388f060 | 681 | $(NM) -m $(RC_ARCHS:%=-arch %) $(DYLIB_OBJS) | fgrep "weak external" | fgrep -v "undefined" | sed -e 's/.*weak external[^_]*//' | sort | uniq | cat >$$tmpfile; \ |
729e4ab9 | 682 | $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \ |
4388f060 | 683 | $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ |
729e4ab9 A |
684 | $(CXXFLAGS) $(LDFLAGS) -single_module $(SECTORDER_FLAGS) -unexported_symbols_list $$tmpfile -dead_strip \ |
685 | -install_name $(libdir)$($(INSTALLED_DYLIB_$@)) -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \ | |
686 | if test "$@" = "icu"; then \ | |
687 | ln -fs $(INSTALLED_DYLIB) $(DYLIB); \ | |
688 | $($(ENV_$@)) $(CXX) $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \ | |
689 | $(LDFLAGS) -Wl,-S -Wl,-x -dead_strip -o ./$(INFOTOOL) $(INFOTOOL_OBJS) -L./ -l$(LIB_NAME) ; \ | |
690 | fi; \ | |
691 | fi; \ | |
73c04bcf A |
692 | if test -f ./$(ICU_DATA_DIR)/$(B_DATA_FILE); then \ |
693 | ln -fs ./$(ICU_DATA_DIR)/$(B_DATA_FILE); \ | |
73c04bcf A |
694 | fi; \ |
695 | if test -f ./$(ICU_DATA_DIR)/$(L_DATA_FILE); then \ | |
696 | ln -fs ./$(ICU_DATA_DIR)/$(L_DATA_FILE); \ | |
697 | else \ | |
729e4ab9 A |
698 | DYLD_LIBRARY_PATH=$(ICUPKGTOOLIBS) \ |
699 | $(ICUPKGTOOL) -tl ./$(ICU_DATA_DIR)/$(B_DATA_FILE) $(L_DATA_FILE); \ | |
73c04bcf | 700 | fi; \ |
374ca955 A |
701 | fi; \ |
702 | ); | |
703 | ||
729e4ab9 A |
704 | crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile |
705 | (cd $(CROSSHOST_OBJROOT); \ | |
706 | $(MAKE) $($(ENV_BUILDHOST)); \ | |
707 | ); | |
708 | ||
374ca955 | 709 | check : icu |
729e4ab9 | 710 | ifneq "$(CROSS_BUILD)" "YES" |
374ca955 | 711 | (cd $(OBJROOT); \ |
73c04bcf A |
712 | ICU_DATA=$(OBJROOT) $(MAKE) $(ENV) check; \ |
713 | ); | |
729e4ab9 A |
714 | else |
715 | $(warning check not supported for cross-build) | |
716 | endif | |
73c04bcf A |
717 | |
718 | check-debug: debug | |
729e4ab9 | 719 | ifneq "$(CROSS_BUILD)" "YES" |
73c04bcf A |
720 | (cd $(OBJROOT); \ |
721 | ICU_DATA=$(OBJROOT) $(MAKE) $(ENV_DEBUG) check; \ | |
374ca955 | 722 | ); |
729e4ab9 A |
723 | else |
724 | $(warning check not supported for cross-build) | |
725 | endif | |
374ca955 A |
726 | |
727 | samples: icu | |
728 | (cd $(OBJROOT)/samples; \ | |
729 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ | |
730 | ); | |
731 | ||
732 | extra: icu | |
733 | (cd $(OBJROOT)/extra; \ | |
734 | $(MAKE) $(ENV_DEBUG) $(LIBOVERRIDES); \ | |
735 | ); | |
736 | ||
729e4ab9 | 737 | ifneq "$(CROSS_BUILD)" "YES" |
374ca955 | 738 | $(OBJROOT)/Makefile : |
729e4ab9 A |
739 | else |
740 | $(OBJROOT)/Makefile : crossbuildhost | |
741 | endif | |
374ca955 A |
742 | if test ! -d $(OBJROOT); then \ |
743 | mkdir -p $(OBJROOT); \ | |
744 | fi; | |
4388f060 | 745 | cp -Rpf $(SRCROOT)/icuSources/* $(OBJROOT); |
73c04bcf | 746 | if test "$(WINDOWS)" = "YES"; then \ |
73c04bcf | 747 | (cd $(OBJROOT)/data/unidata; mv base_unidata/*.txt .;); \ |
729e4ab9 A |
748 | (cd $(OBJROOT)/data/unidata/norm2; mv base_norm2/*.txt .;); \ |
749 | (cd $(OBJROOT)/data/in; mv base_in/*.nrm .; mv base_in/*.icu .;); \ | |
73c04bcf | 750 | (cd $(OBJROOT); $(ENV_CONFIGURE) ./runConfigureICU Cygwin/MSVC $(CONFIG_FLAGS);) \ |
729e4ab9 | 751 | elif test "$(LINUX)" = "YES"; then \ |
729e4ab9 A |
752 | (cd $(OBJROOT)/data/unidata; mv base_unidata/*.txt .;); \ |
753 | (cd $(OBJROOT)/data/unidata/norm2; mv base_norm2/*.txt .;); \ | |
754 | (cd $(OBJROOT)/data/in; mv base_in/*.nrm .; mv base_in/*.icu .;); \ | |
755 | (cd $(OBJROOT); $(ENV_CONFIGURE) ./runConfigureICU Linux $(CONFIG_FLAGS);) \ | |
756 | elif test "$(CROSS_BUILD)" = "YES"; then \ | |
4388f060 | 757 | (cd $(OBJROOT); $(ENV_CONFIGURE) ./configure --host=$(TARGET_SPEC) --with-cross-build=$(CROSSHOST_OBJROOT) $(CONFIG_FLAGS);) \ |
73c04bcf | 758 | else \ |
4388f060 | 759 | (cd $(OBJROOT); $(ENV_CONFIGURE) ./runConfigureICU MacOSX $(CONFIG_FLAGS);) \ |
374ca955 | 760 | fi; |
46f4442e | 761 | if test "$(APPLE_EMBEDDED)" = "YES"; then \ |
4388f060 | 762 | (cd $(OBJROOT)/common/unicode/; patch <$(SRCROOT)/minimalpatchconfig.txt;) \ |
73c04bcf | 763 | elif test "$(WINDOWS)" = "YES"; then \ |
4388f060 | 764 | (cd $(OBJROOT)/common/unicode/; patch <$(SRCROOT)/windowspatchconfig.txt;) \ |
73c04bcf | 765 | else \ |
4388f060 | 766 | (cd $(OBJROOT)/common/unicode/; patch <$(SRCROOT)/patchconfig.txt;) \ |
73c04bcf | 767 | fi; \ |
4388f060 | 768 | # used to copy the Makefile.local from common & i18n in $(SRCROOT) to $(OBJROOT), no longer needed since we copy all of $(SRCROOT) |
729e4ab9 A |
769 | |
770 | # for the tools that build the data file, cannot set UDATA_DEFAULT_ACCESS = UDATA_ONLY_PACKAGES | |
771 | # as minimalpatchconfig.txt does; need different patches for the host build. | |
772 | $(CROSSHOST_OBJROOT)/Makefile : | |
773 | if test ! -d $(CROSSHOST_OBJROOT); then \ | |
774 | mkdir -p $(CROSSHOST_OBJROOT); \ | |
775 | fi; | |
4388f060 A |
776 | cp -Rpf $(SRCROOT)/icuSources/* $(CROSSHOST_OBJROOT); |
777 | (cd $(CROSSHOST_OBJROOT); $(ENV_CONFIGURE_BUILDHOST) ./runConfigureICU MacOSX $(CONFIG_FLAGS);) | |
778 | (cd $(CROSSHOST_OBJROOT)/common/unicode/; patch <$(SRCROOT)/crosshostpatchconfig.txt;) | |
779 | # used to copy the Makefile.local from common & i18n in $(SRCROOT) to $(CROSSHOST_OBJROOT), no longer needed since we copy all of $(SRCROOT) | |
374ca955 A |
780 | |
781 | ################################# | |
782 | # B&I TARGETS | |
783 | ################################# | |
784 | ||
b75a7d8f A |
785 | # Since our sources are in icuSources (ignore the ICU subdirectory for now), we wish to |
786 | # copy them to somewhere else. We tar it to stdout, cd to the appropriate directory, and | |
787 | # untar from stdin. We then look for all the CVS directories and remove them. We may have | |
788 | # to remove the .cvsignore files also. | |
789 | ||
790 | installsrc : | |
791 | if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi; | |
792 | if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi; | |
46f4442e | 793 | tar cf - ./makefile ./ICU.plist ./license.html ./icuSources $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \ |
b75a7d8f A |
794 | for i in `find $(SRCROOT)/icuSources/ | grep "CVS$$"` ; do \ |
795 | if test -d $$i ; then \ | |
796 | rm -rf $$i; \ | |
797 | fi; \ | |
798 | done | |
799 | for j in `find $(SRCROOT)/icuSources/ | grep ".cvsignore"` ; do \ | |
800 | if test -f $$j ; then \ | |
801 | rm -f $$j; \ | |
802 | fi; \ | |
803 | done | |
804 | ||
46f4442e | 805 | # This works. Just not for ~ in the DEST_ROOT. We run configure first (in case it hasn't |
b75a7d8f A |
806 | # been already). Then we make the install-headers target on specific makefiles (since |
807 | # not every subdirectory/sub-component has a install-headers target). | |
808 | ||
46f4442e A |
809 | # installhdrs should be no-op for RC_INDIGO |
810 | ifeq "$(RC_INDIGO)" "YES" | |
811 | installhdrs : | |
812 | else | |
813 | installhdrs : installhdrsint | |
814 | endif | |
815 | ||
816 | installhdrsint : $(OBJROOT)/Makefile | |
374ca955 | 817 | (cd $(OBJROOT); \ |
73c04bcf | 818 | for subdir in $(HDR_MAKE_SUBDIR); do \ |
46f4442e | 819 | (cd $$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-headers); \ |
73c04bcf | 820 | done; \ |
729e4ab9 A |
821 | if test "$(APPLE_EMBEDDED)" = "YES"; then \ |
822 | if test ! -d $(DEST_ROOT)$(HDR_PREFIX)/include/unicode/; then \ | |
823 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(HDR_PREFIX)/include/unicode/; \ | |
824 | fi; \ | |
825 | if test -d $(DEST_ROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/; then \ | |
826 | (cd $(DEST_ROOT)$(PRIVATE_HDR_PREFIX)/include/unicode; \ | |
827 | for i in *.h; do \ | |
828 | if fgrep -q -x $$i $(SRCROOT)/minimalapis.txt ; then \ | |
829 | mv $$i $(DEST_ROOT)$(HDR_PREFIX)/include/unicode ; \ | |
830 | fi ; \ | |
831 | done ); \ | |
832 | $(CC) $(SRCROOT)/minimalapisTest.c $(INSTALLHDRS_ARCH) $(ISYSROOT) -nostdinc \ | |
833 | -I $(DEST_ROOT)$(HDR_PREFIX)/include/ -I $(SDKROOT)/usr/include/ -E > /dev/null ; \ | |
834 | fi; \ | |
835 | fi; \ | |
73c04bcf | 836 | ); |
374ca955 | 837 | |
b75a7d8f A |
838 | # We run configure and run make first. This generates the .o files. We then link them |
839 | # all up together into libicucore. Then we put it into its install location, create | |
840 | # symbolic links, and then strip the main dylib. Then install the remaining libraries. | |
841 | # We cleanup the sources folder. | |
73c04bcf | 842 | |
46f4442e A |
843 | install : installhdrsint icu |
844 | if test ! -d $(DEST_ROOT)$(libdir)/; then \ | |
845 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \ | |
374ca955 | 846 | fi; |
73c04bcf | 847 | if test "$(WINDOWS)" = "YES"; then \ |
46f4442e A |
848 | if test ! -d $(DEST_ROOT)$(winlibdir)/; then \ |
849 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winlibdir)/; \ | |
73c04bcf | 850 | fi; \ |
729e4ab9 A |
851 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuuc.lib $(DEST_ROOT)$(winlibdir)libicuuc.lib; \ |
852 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuuc.pdb $(DEST_ROOT)$(libdir)libicuuc.pdb; \ | |
853 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/libicuuc.dll $(DEST_ROOT)$(libdir)libicuuc.dll; \ | |
854 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuin.lib $(DEST_ROOT)$(winlibdir)libicuin.lib; \ | |
855 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuin.pdb $(DEST_ROOT)$(libdir)libicuin.pdb; \ | |
856 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/libicuin.dll $(DEST_ROOT)$(libdir)libicuin.dll; \ | |
46f4442e | 857 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/icudt$(ICU_VERS).dll $(DEST_ROOT)$(libdir)icudt$(ICU_VERS).dll; \ |
729e4ab9 A |
858 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/shim/icuuc.lib $(DEST_ROOT)$(winlibdir)icuuc.lib; \ |
859 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/icuuc40.pdb $(DEST_ROOT)$(libdir)icuuc40.pdb; \ | |
860 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/icuuc40.dll $(DEST_ROOT)$(libdir)icuuc40.dll; \ | |
861 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/shim/icuin.lib $(DEST_ROOT)$(winlibdir)icuin.lib; \ | |
862 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/icuin40.pdb $(DEST_ROOT)$(libdir)icuin40.pdb; \ | |
863 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/icuin40.dll $(DEST_ROOT)$(libdir)icuin40.dll; \ | |
73c04bcf | 864 | else \ |
729e4ab9 A |
865 | $(INSTALL) -b -m 0755 $(OBJROOT)/$(INSTALLED_DYLIB) $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ |
866 | if test "$(LINUX)" = "YES"; then \ | |
867 | cp $(OBJROOT)/$(INSTALLED_DYLIB) $(SYMROOT)/$(INSTALLED_DYLIB); \ | |
868 | strip -x -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ | |
869 | else \ | |
870 | (cd $(DEST_ROOT)$(libdir); \ | |
871 | ln -fs $(INSTALLED_DYLIB) $(DYLIB)); \ | |
872 | cp $(OBJROOT)/$(INSTALLED_DYLIB) $(SYMROOT)/$(INSTALLED_DYLIB); \ | |
4388f060 | 873 | $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$(INSTALLED_DYLIB); \ |
729e4ab9 | 874 | fi; \ |
73c04bcf | 875 | for subdir in $(EXTRA_LIBS); do \ |
46f4442e | 876 | (cd $(OBJROOT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \ |
73c04bcf | 877 | done; \ |
46f4442e A |
878 | if test ! -d $(DEST_ROOT)$(datadir)/; then \ |
879 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(datadir)/; \ | |
73c04bcf | 880 | fi; \ |
73c04bcf | 881 | if test -f $(OBJROOT)/$(L_DATA_FILE); then \ |
46f4442e | 882 | $(INSTALL) -b -m 0644 $(OBJROOT)/$(L_DATA_FILE) $(DEST_ROOT)$(datadir)$(L_DATA_FILE); \ |
73c04bcf | 883 | fi; \ |
46f4442e A |
884 | if test ! -d $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; then \ |
885 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)/; \ | |
73c04bcf | 886 | fi; \ |
46f4442e A |
887 | $(INSTALL) -b -m 0644 $(SRCROOT)/ICU.plist $(DEST_ROOT)$(OPEN_SOURCE_VERSIONS_DIR)ICU.plist; \ |
888 | if test ! -d $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)/; then \ | |
889 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)/; \ | |
73c04bcf | 890 | fi; \ |
46f4442e | 891 | $(INSTALL) -b -m 0644 $(SRCROOT)/license.html $(DEST_ROOT)$(OPEN_SOURCE_LICENSES_DIR)ICU.html; \ |
729e4ab9 A |
892 | if test ! -d $(DEST_ROOT)$(localtooldir)/; then \ |
893 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(localtooldir)/; \ | |
894 | fi; \ | |
895 | if test -f $(OBJROOT)/$(INFOTOOL); then \ | |
896 | $(INSTALL) -b -m 0755 $(OBJROOT)/$(INFOTOOL) $(DEST_ROOT)$(localtooldir)$(INFOTOOL); \ | |
897 | fi; \ | |
b75a7d8f | 898 | fi; |
73c04bcf A |
899 | |
900 | DEPEND_install_debug = debug | |
901 | DEPEND_install_profile = profile | |
902 | ||
903 | .SECONDEXPANSION: | |
904 | install_debug install_profile : $$(DEPEND_$$@) | |
46f4442e A |
905 | if test ! -d $(DEST_ROOT)$(libdir)/; then \ |
906 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(libdir)/; \ | |
b75a7d8f | 907 | fi; |
73c04bcf | 908 | if test "$(WINDOWS)" = "YES"; then \ |
46f4442e A |
909 | if test ! -d $(DEST_ROOT)$(winlibdir)/; then \ |
910 | $(INSTALL) -d -m 0755 $(DEST_ROOT)$(winlibdir)/; \ | |
73c04bcf | 911 | fi; \ |
729e4ab9 A |
912 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuuc_$(DEPEND_$@).lib $(DEST_ROOT)$(winlibdir)libicuuc_$(DEPEND_$@).lib; \ |
913 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuuc_$(DEPEND_$@).pdb $(DEST_ROOT)$(libdir)libicuuc_$(DEPEND_$@).pdb; \ | |
914 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/libicuuc_$(DEPEND_$@).dll $(DEST_ROOT)$(libdir)libicuuc_$(DEPEND_$@).dll; \ | |
915 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuin_$(DEPEND_$@).lib $(DEST_ROOT)$(winlibdir)libicuin_$(DEPEND_$@).lib; \ | |
916 | $(INSTALL) -b -m 0644 $(OBJROOT)/lib/libicuin_$(DEPEND_$@).pdb $(DEST_ROOT)$(libdir)libicuin_$(DEPEND_$@).pdb; \ | |
917 | $(INSTALL) -b -m 0755 $(OBJROOT)/lib/libicuin_$(DEPEND_$@).dll $(DEST_ROOT)$(libdir)libicuin_$(DEPEND_$@).dll; \ | |
73c04bcf | 918 | else \ |
46f4442e | 919 | $(INSTALL) -b -m 0664 $(OBJROOT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
729e4ab9 A |
920 | if test "$(LINUX)" = "YES"; then \ |
921 | cp $(OBJROOT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ | |
922 | strip -x -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ | |
923 | else \ | |
924 | (cd $(DEST_ROOT)$(libdir); \ | |
925 | ln -fs $($(INSTALLED_DYLIB_$(DEPEND_$@))) $($(DYLIB_$(DEPEND_$@)))); \ | |
926 | cp $(OBJROOT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ | |
4388f060 | 927 | $(STRIPCMD) -x -u -r -S $(DEST_ROOT)$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \ |
729e4ab9 | 928 | fi; \ |
73c04bcf | 929 | for subdir in $(EXTRA_LIBS); do \ |
46f4442e | 930 | (cd $(OBJROOT)/$$subdir; $(MAKE) -e DESTDIR=$(DEST_ROOT) $(ENV) install-library;) \ |
73c04bcf | 931 | done; \ |
b75a7d8f | 932 | fi; |
b75a7d8f | 933 | |
374ca955 A |
934 | clean : |
935 | -rm -rf $(OBJROOT) | |
73c04bcf | 936 |