2 #******************************************************************************
3 # Copyright (C) 1999-2004, 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
83 ### To link your application with ICU:
84 # 1. use LDFLAGS, CFLAGS, etc from above
85 # 2. link with $(ICULIBS)
86 # 3. optionally, add one or more of:
87 # - $(ICULIBS_I18N) - i18n library, formatting, etc.
88 # - $(ICULIBS_LAYOUT) - ICU layout library.
89 # - $(ICULIBS_ICUIO) - ICU stdio equivalent library
91 ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
92 ICULIBS_DATA = -l$(ICUPREFIX)data$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
93 ICULIBS_I18N = -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
94 ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
95 ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
96 ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
97 ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
98 ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
99 ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
100 ICULIBS_BASE = $(LIBS) -L$(libdir)
102 # for icu-config to test with
103 ICULIBS_COMMON_LIB_NAME = ${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
105 # ICULIBS is the set of libraries your application should link
106 # with usually. Many applications will want to add $(ICULIBS_I18N) as well.
107 ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
109 ##################################################################
110 ##################################################################
112 # *2* access to ICU tools
114 ##################################################################
115 # Environment variable to set a runtime search path
116 # (Overridden when necessary in -mh files)
117 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
119 # Versioned target for a shared library
120 FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
121 MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
123 # Access to important ICU tools.
124 # Use as follows: $(INVOKE) $(GENRB) arguments ..
125 INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
126 GENCCODE = $(sbindir)/genccode
127 GENCMN = $(sbindir)/gencmn
128 GENRB = $(bindir)/genrb
129 PKGDATA = $(bindir)/pkgdata
131 ##################################################################
132 ##################################################################
134 # *3* Information about the host
136 ##################################################################
138 # Information about the host that 'configure' was run on.
140 host_alias = @host_alias@
141 host_cpu = @host_cpu@
142 host_vendor = @host_vendor@
144 # Our platform canonical name (as determined by configure)
145 # this is a #define value (i.e. U_XXXX or XXXX)
146 platform = @platform@
148 ##################################################################
149 ##################################################################
151 # *4* compiler flags and misc. options
153 ##################################################################
154 AIX_SHLIB = @AIX_SHLIB@
159 CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
161 CXXFLAGS = @CXXFLAGS@
162 DEFAULT_MODE = @DATA_PACKAGING_MODE@
166 INSTALL_DATA = @INSTALL_DATA@
167 INSTALL_DATA = @INSTALL_DATA@
168 INSTALL_PROGRAM = @INSTALL_PROGRAM@
169 INSTALL_PROGRAM = @INSTALL_PROGRAM@
170 INSTALL_SCRIPT = @INSTALL_SCRIPT@
171 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
174 LIB_VERSION = @LIB_VERSION@
175 LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
176 MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
180 SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
181 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
182 U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
183 includedir = @includedir@
185 ld_rpath_suf = @ld_rpath_suf@
186 localstatedir = @localstatedir@
188 oldincludedir = @oldincludedir@
189 program_transform_name = @program_transform_name@
190 sharedstatedir = @sharedstatedir@
191 sysconfdir = @sysconfdir@
192 INSTALL-L = ${INSTALL_DATA}
195 ##################################################################
196 ##################################################################
198 # *5* packaging options and directories
200 ##################################################################
202 pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
203 pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
205 # The basename of the ICU data file (i.e. icudt21b )
206 ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
208 # Defaults for pkgdata's mode and directories
209 # The default data dir changes depending on what packaging mode
211 ifeq ($(strip $(PKGDATA_MODE)),)
212 #SH# if [ "x$PKGDATA_MODE" = "x" ];
214 PKGDATA_MODE=@DATA_PACKAGING_MODE@
218 #SH# case "$PKGDATA_MODE" in
219 ifeq ($(PKGDATA_MODE),common)
221 ICUDATA_DIR = $(pkgdatadir)
222 ICUPKGDATA_DIR = $(ICUDATA_DIR)
225 ifeq ($(PKGDATA_MODE),dll)
227 ICUDATA_DIR = $(pkgdatadir)
228 ICUPKGDATA_DIR = $(libdir)
232 ICUDATA_DIR = $(pkgdatadir)
233 ICUPKGDATA_DIR = $(ICUDATA_DIR)
240 GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
242 ##################################################################
243 ##################################################################
245 # *6* Inclusion of platform make fragment (mh-* file)
247 ##################################################################
248 # The mh- file ("make fragment") for the platform is included here.
249 # It may override the above settings.
250 # It is put last so that the mh-file can override anything.
252 include $(pkgdatadir)/config/@platform_make_fragment_name@