2 #******************************************************************************
3 # Copyright (C) 1999-2005, International Business Machines
4 # Corporation and others. All Rights Reserved.
5 #******************************************************************************
6 # This Makefile.inc is designed to be included into projects which make use
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)
17 ##################################################################
18 ##################################################################
20 # *1* base configuration information and linkage
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
29 exec_prefix = @exec_prefix@
31 libexecdir = @libexecdir@
36 # about the ICU version
38 UNICODE_VERSION = @UNICODE_VERSION@
40 # The prefix for ICU libraries, normally 'icu'
43 LIBICU = lib$(ICUPREFIX)
45 # Static library prefix and file extension
47 LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
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.
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)
64 #SH## icu-config version of above 'if':
65 #SH#case "$ENABLE_RPATH" in
68 #SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
77 #SH# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2
82 # Name flexibility for the library naming scheme. Any modifications should
83 # be made in the mh- file for the specific platform.
88 LAYOUTEX_STUBNAME = lx
90 TOOLUTIL_STUBNAME = tu
91 CTESTFW_STUBNAME = test
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.
101 # - $(ICULIBS_ICUIO) - ICU stdio equivalent library
103 ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
104 ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
105 ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
106 ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
107 ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
108 ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
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)
114 # for icu-config to test with
115 ICULIBS_COMMON_LIB_NAME = ${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
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)
121 ##################################################################
122 ##################################################################
124 # *2* access to ICU tools
126 ##################################################################
127 # Environment variable to set a runtime search path
128 # (Overridden when necessary in -mh files)
129 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
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)
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
143 ##################################################################
144 ##################################################################
146 # *3* Information about the host
148 ##################################################################
150 # Information about the host that 'configure' was run on.
152 host_alias = @host_alias@
153 host_cpu = @host_cpu@
154 host_vendor = @host_vendor@
156 # Our platform canonical name (as determined by configure)
157 # this is a #define value (i.e. U_XXXX or XXXX)
158 platform = @platform@
160 ##################################################################
161 ##################################################################
163 # *4* compiler flags and misc. options
165 ##################################################################
166 AIX_SHLIB = @AIX_SHLIB@
168 # initial tab keeps it out of the shell version.
169 ARFLAGS := @ARFLAGS@ $(ARFLAGS)
170 #SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}"
174 CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
176 CXXFLAGS = @CXXFLAGS@
177 DEFAULT_MODE = @DATA_PACKAGING_MODE@
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)
189 LIB_VERSION = @LIB_VERSION@
190 LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
191 MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
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@
200 ld_rpath_suf = @ld_rpath_suf@
201 localstatedir = @localstatedir@
203 oldincludedir = @oldincludedir@
204 program_transform_name = @program_transform_name@
205 sharedstatedir = @sharedstatedir@
206 sysconfdir = @sysconfdir@
207 INSTALL-L = ${INSTALL_DATA}
210 ##################################################################
211 ##################################################################
213 # *5* packaging options and directories
215 ##################################################################
217 pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
218 pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
220 # The basename of the ICU data file (i.e. icudt21b )
221 ICUDATA_CHAR = @ICUDATA_CHAR@
222 ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
224 # Defaults for pkgdata's mode and directories
225 # The default data dir changes depending on what packaging mode
227 ifeq ($(strip $(PKGDATA_MODE)),)
228 #SH# if [ "x$PKGDATA_MODE" = "x" ];
230 PKGDATA_MODE=@DATA_PACKAGING_MODE@
234 #SH# case "$PKGDATA_MODE" in
235 ifeq ($(PKGDATA_MODE),common)
237 ICUDATA_DIR = $(pkgdatadir)
238 ICUPKGDATA_DIR = $(ICUDATA_DIR)
241 ifeq ($(PKGDATA_MODE),dll)
243 ICUDATA_DIR = $(pkgdatadir)
244 ICUPKGDATA_DIR = $(libdir)
248 ICUDATA_DIR = $(pkgdatadir)
249 ICUPKGDATA_DIR = $(ICUDATA_DIR)
256 GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
258 ##################################################################
259 ##################################################################
261 # *6* Inclusion of platform make fragment (mh-* file)
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.
268 include $(pkgdatadir)/config/@platform_make_fragment_name@