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