]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | ## -*-makefile-*- |
2 | #****************************************************************************** | |
46f4442e | 3 | # Copyright (C) 1999-2008, International Business Machines |
b75a7d8f | 4 | # Corporation and others. All Rights Reserved. |
b75a7d8f A |
5 | #****************************************************************************** |
6 | # This Makefile.inc is designed to be included into projects which make use | |
7 | # of the ICU. | |
8 | ||
9 | # CONTENTS OF THIS FILE | |
10 | # 1). Base configuration information and linkage | |
11 | # 2). Variables giving access to ICU tools | |
12 | # 3). Host information | |
13 | # 4). Compiler flags and settings | |
14 | # 5). Data Packaging directives | |
15 | # 6). Include of platform make fragment (mh-* file) | |
16 | ||
17 | ################################################################## | |
18 | ################################################################## | |
19 | # | |
20 | # *1* base configuration information and linkage | |
21 | # | |
22 | ################################################################## | |
23 | # The PREFIX is the base of where ICU is installed. | |
24 | # Inside this directory you should find bin, lib, include/unicode, | |
25 | # etc. If ICU is not installed in this directory, you must change the | |
26 | # following line. There should exist $(prefix)/include/unicode/utypes.h | |
27 | # for example. | |
28 | prefix = @prefix@ | |
29 | exec_prefix = @exec_prefix@ | |
30 | libdir = @libdir@ | |
31 | libexecdir = @libexecdir@ | |
32 | bindir = @bindir@ | |
46f4442e | 33 | datarootdir = @datarootdir@ |
b75a7d8f A |
34 | datadir = @datadir@ |
35 | sbindir = @sbindir@ | |
36 | ||
37 | # about the ICU version | |
38 | VERSION = @VERSION@ | |
39 | UNICODE_VERSION = @UNICODE_VERSION@ | |
40 | ||
41 | # The prefix for ICU libraries, normally 'icu' | |
42 | ICUPREFIX = icu | |
43 | PACKAGE = @PACKAGE@ | |
44 | LIBICU = lib$(ICUPREFIX) | |
45 | ||
374ca955 A |
46 | # Static library prefix and file extension |
47 | STATIC_PREFIX = s | |
48 | LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX) | |
49 | A = a | |
50 | ||
b75a7d8f A |
51 | # Suffix at the end of libraries. Usually empty. |
52 | ICULIBSUFFIX = @ICULIBSUFFIX@ | |
53 | # ICULIBSUFFIX_VERSION is non-empty if it is to contain a library | |
54 | # version. For example, if it is 21, it means libraries are named | |
55 | # libicuuc21.so for example. | |
56 | ||
57 | # rpath links a library search path right into the binaries. | |
58 | ## mh-files MUST NOT override RPATHLDFLAGS unless they provide | |
59 | ## equivalent '#SH#' lines for icu-config fixup | |
60 | ENABLE_RPATH = @ENABLE_RPATH@ | |
61 | ifeq ($(ENABLE_RPATH),YES) | |
62 | RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) | |
63 | endif | |
64 | ||
65 | #SH## icu-config version of above 'if': | |
66 | #SH#case "$ENABLE_RPATH" in | |
67 | #SH# [yY]*) | |
68 | #SH# ENABLE_RPATH=YES | |
69 | #SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}" | |
70 | #SH# ;; | |
71 | #SH# | |
72 | #SH# [nN]*) | |
73 | #SH# ENABLE_RPATH=NO | |
74 | #SH# RPATHLDFLAGS="" | |
75 | #SH# ;; | |
76 | #SH# | |
77 | #SH# *) | |
78 | #SH# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2 | |
79 | #SH# exit 3 | |
80 | #SH# ;; | |
81 | #SH#esac | |
82 | ||
73c04bcf A |
83 | # Name flexibility for the library naming scheme. Any modifications should |
84 | # be made in the mh- file for the specific platform. | |
85 | DATA_STUBNAME = data | |
86 | COMMON_STUBNAME = uc | |
87 | I18N_STUBNAME = i18n | |
88 | LAYOUT_STUBNAME = le | |
89 | LAYOUTEX_STUBNAME = lx | |
90 | IO_STUBNAME = io | |
91 | TOOLUTIL_STUBNAME = tu | |
92 | CTESTFW_STUBNAME = test | |
93 | ||
94 | ||
b75a7d8f A |
95 | |
96 | ### To link your application with ICU: | |
97 | # 1. use LDFLAGS, CFLAGS, etc from above | |
98 | # 2. link with $(ICULIBS) | |
99 | # 3. optionally, add one or more of: | |
100 | # - $(ICULIBS_I18N) - i18n library, formatting, etc. | |
101 | # - $(ICULIBS_LAYOUT) - ICU layout library. | |
374ca955 | 102 | # - $(ICULIBS_ICUIO) - ICU stdio equivalent library |
b75a7d8f A |
103 | |
104 | ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) | |
73c04bcf A |
105 | ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) |
106 | ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) | |
374ca955 | 107 | ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) |
b75a7d8f | 108 | ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) |
374ca955 | 109 | ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) |
b75a7d8f A |
110 | ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) |
111 | ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) | |
112 | ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) | |
113 | ICULIBS_BASE = $(LIBS) -L$(libdir) | |
114 | ||
115 | # for icu-config to test with | |
116 | ICULIBS_COMMON_LIB_NAME = ${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO} | |
117 | ||
118 | # ICULIBS is the set of libraries your application should link | |
119 | # with usually. Many applications will want to add $(ICULIBS_I18N) as well. | |
120 | ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA) | |
121 | ||
122 | ################################################################## | |
123 | ################################################################## | |
124 | # | |
125 | # *2* access to ICU tools | |
126 | # | |
127 | ################################################################## | |
128 | # Environment variable to set a runtime search path | |
129 | # (Overridden when necessary in -mh files) | |
130 | LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH | |
131 | ||
374ca955 A |
132 | # Versioned target for a shared library |
133 | FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION) | |
134 | MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR) | |
135 | ||
b75a7d8f A |
136 | # Access to important ICU tools. |
137 | # Use as follows: $(INVOKE) $(GENRB) arguments .. | |
138 | INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER) | |
139 | GENCCODE = $(sbindir)/genccode | |
46f4442e | 140 | ICUPKG = $(sbindir)/icupkg |
b75a7d8f A |
141 | GENCMN = $(sbindir)/gencmn |
142 | GENRB = $(bindir)/genrb | |
143 | PKGDATA = $(bindir)/pkgdata | |
144 | ||
46f4442e A |
145 | # moved here because of dependencies |
146 | pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION) | |
147 | pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION) | |
148 | ||
b75a7d8f A |
149 | ################################################################## |
150 | ################################################################## | |
151 | # | |
152 | # *3* Information about the host | |
153 | # | |
154 | ################################################################## | |
155 | ||
156 | # Information about the host that 'configure' was run on. | |
157 | host = @host@ | |
158 | host_alias = @host_alias@ | |
159 | host_cpu = @host_cpu@ | |
160 | host_vendor = @host_vendor@ | |
161 | host_os = @host_os@ | |
162 | # Our platform canonical name (as determined by configure) | |
163 | # this is a #define value (i.e. U_XXXX or XXXX) | |
164 | platform = @platform@ | |
165 | ||
166 | ################################################################## | |
167 | ################################################################## | |
168 | # | |
169 | # *4* compiler flags and misc. options | |
170 | # | |
171 | ################################################################## | |
b75a7d8f | 172 | AR = @AR@ |
73c04bcf A |
173 | # initial tab keeps it out of the shell version. |
174 | ARFLAGS := @ARFLAGS@ $(ARFLAGS) | |
175 | #SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}" | |
b75a7d8f A |
176 | CC = @CC@ |
177 | CFLAGS = @CFLAGS@ | |
178 | CPP = @CPP@ | |
179 | CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include | |
180 | CXX = @CXX@ | |
181 | CXXFLAGS = @CXXFLAGS@ | |
182 | DEFAULT_MODE = @DATA_PACKAGING_MODE@ | |
183 | DEFS = @DEFS@ | |
184 | FFLAGS = @FFLAGS@ | |
46f4442e A |
185 | # use a consistent INSTALL |
186 | INSTALL = $(SHELL) $(pkgdatadir)/install-sh -c | |
b75a7d8f A |
187 | INSTALL_DATA = @INSTALL_DATA@ |
188 | INSTALL_DATA = @INSTALL_DATA@ | |
189 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
190 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
191 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | |
192 | LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) | |
193 | LIBS = @LIBS@ | |
194 | LIB_M = @LIB_M@ | |
195 | LIB_VERSION = @LIB_VERSION@ | |
196 | LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@ | |
197 | MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs | |
198 | RANLIB = @RANLIB@ | |
199 | RMV = rm -rf | |
200 | SHELL = @SHELL@ | |
201 | SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared | |
202 | SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared | |
203 | U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@ | |
204 | includedir = @includedir@ | |
205 | infodir = @infodir@ | |
b75a7d8f A |
206 | localstatedir = @localstatedir@ |
207 | mandir = @mandir@ | |
208 | oldincludedir = @oldincludedir@ | |
209 | program_transform_name = @program_transform_name@ | |
210 | sharedstatedir = @sharedstatedir@ | |
211 | sysconfdir = @sysconfdir@ | |
212 | INSTALL-L = ${INSTALL_DATA} | |
213 | ||
214 | ||
215 | ################################################################## | |
216 | ################################################################## | |
217 | # | |
218 | # *5* packaging options and directories | |
219 | # | |
220 | ################################################################## | |
221 | ||
b75a7d8f A |
222 | |
223 | # The basename of the ICU data file (i.e. icudt21b ) | |
73c04bcf | 224 | ICUDATA_CHAR = @ICUDATA_CHAR@ |
b75a7d8f A |
225 | ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@ |
226 | ||
227 | # Defaults for pkgdata's mode and directories | |
228 | # The default data dir changes depending on what packaging mode | |
229 | # is being used | |
230 | ifeq ($(strip $(PKGDATA_MODE)),) | |
374ca955 A |
231 | #SH# if [ "x$PKGDATA_MODE" = "x" ]; |
232 | #SH# then | |
b75a7d8f | 233 | PKGDATA_MODE=@DATA_PACKAGING_MODE@ |
374ca955 | 234 | #SH# fi |
b75a7d8f | 235 | endif |
374ca955 A |
236 | |
237 | #SH# case "$PKGDATA_MODE" in | |
b75a7d8f | 238 | ifeq ($(PKGDATA_MODE),common) |
374ca955 | 239 | #SH# common) |
b75a7d8f A |
240 | ICUDATA_DIR = $(pkgdatadir) |
241 | ICUPKGDATA_DIR = $(ICUDATA_DIR) | |
374ca955 | 242 | #SH# ;; |
b75a7d8f A |
243 | else |
244 | ifeq ($(PKGDATA_MODE),dll) | |
374ca955 | 245 | #SH# dll) |
b75a7d8f A |
246 | ICUDATA_DIR = $(pkgdatadir) |
247 | ICUPKGDATA_DIR = $(libdir) | |
374ca955 | 248 | #SH# ;; |
b75a7d8f | 249 | else |
374ca955 A |
250 | #SH# *) |
251 | ICUDATA_DIR = $(pkgdatadir) | |
b75a7d8f | 252 | ICUPKGDATA_DIR = $(ICUDATA_DIR) |
374ca955 | 253 | #SH# ;; |
b75a7d8f A |
254 | endif |
255 | endif | |
256 | ||
374ca955 A |
257 | #SH# esac |
258 | ||
259 | GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@ | |
b75a7d8f A |
260 | |
261 | ################################################################## | |
262 | ################################################################## | |
263 | # | |
264 | # *6* Inclusion of platform make fragment (mh-* file) | |
265 | # | |
266 | ################################################################## | |
267 | # The mh- file ("make fragment") for the platform is included here. | |
268 | # It may override the above settings. | |
269 | # It is put last so that the mh-file can override anything. | |
270 | ||
271 | include $(pkgdatadir)/config/@platform_make_fragment_name@ | |
272 |