]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/Makefile.inc.in
ICU-8.11.4.tar.gz
[apple/icu.git] / icuSources / config / Makefile.inc.in
CommitLineData
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.
28prefix = @prefix@
29exec_prefix = @exec_prefix@
30libdir = @libdir@
31libexecdir = @libexecdir@
32bindir = @bindir@
33datadir = @datadir@
34sbindir = @sbindir@
35
36# about the ICU version
37VERSION = @VERSION@
38UNICODE_VERSION = @UNICODE_VERSION@
39
40# The prefix for ICU libraries, normally 'icu'
41ICUPREFIX = icu
42PACKAGE = @PACKAGE@
43LIBICU = lib$(ICUPREFIX)
44
374ca955
A
45# Static library prefix and file extension
46STATIC_PREFIX = s
47LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
48A = a
49
b75a7d8f
A
50# Suffix at the end of libraries. Usually empty.
51ICULIBSUFFIX = @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
59ENABLE_RPATH = @ENABLE_RPATH@
60ifeq ($(ENABLE_RPATH),YES)
61RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
62endif
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.
84DATA_STUBNAME = data
85COMMON_STUBNAME = uc
86I18N_STUBNAME = i18n
87LAYOUT_STUBNAME = le
88LAYOUTEX_STUBNAME = lx
89IO_STUBNAME = io
90TOOLUTIL_STUBNAME = tu
91CTESTFW_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
103ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
73c04bcf
A
104ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
105ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 106ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f 107ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 108ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f
A
109ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
110ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
111ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
112ICULIBS_BASE = $(LIBS) -L$(libdir)
113
114# for icu-config to test with
115ICULIBS_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.
119ICULIBS = $(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)
129LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
130
374ca955
A
131# Versioned target for a shared library
132FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
133MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
134
b75a7d8f
A
135# Access to important ICU tools.
136# Use as follows: $(INVOKE) $(GENRB) arguments ..
137INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
138GENCCODE = $(sbindir)/genccode
139GENCMN = $(sbindir)/gencmn
140GENRB = $(bindir)/genrb
141PKGDATA = $(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.
151host = @host@
152host_alias = @host_alias@
153host_cpu = @host_cpu@
154host_vendor = @host_vendor@
155host_os = @host_os@
156# Our platform canonical name (as determined by configure)
157# this is a #define value (i.e. U_XXXX or XXXX)
158platform = @platform@
159
160##################################################################
161##################################################################
162#
163# *4* compiler flags and misc. options
164#
165##################################################################
166AIX_SHLIB = @AIX_SHLIB@
167AR = @AR@
73c04bcf
A
168# initial tab keeps it out of the shell version.
169 ARFLAGS := @ARFLAGS@ $(ARFLAGS)
170#SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}"
b75a7d8f
A
171CC = @CC@
172CFLAGS = @CFLAGS@
173CPP = @CPP@
174CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
175CXX = @CXX@
176CXXFLAGS = @CXXFLAGS@
177DEFAULT_MODE = @DATA_PACKAGING_MODE@
178DEFS = @DEFS@
179FFLAGS = @FFLAGS@
180INSTALL = @INSTALL@
181INSTALL_DATA = @INSTALL_DATA@
182INSTALL_DATA = @INSTALL_DATA@
183INSTALL_PROGRAM = @INSTALL_PROGRAM@
184INSTALL_PROGRAM = @INSTALL_PROGRAM@
185INSTALL_SCRIPT = @INSTALL_SCRIPT@
186LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
187LIBS = @LIBS@
188LIB_M = @LIB_M@
189LIB_VERSION = @LIB_VERSION@
190LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
191MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
192RANLIB = @RANLIB@
193RMV = rm -rf
194SHELL = @SHELL@
195SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
196SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
197U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
198includedir = @includedir@
199infodir = @infodir@
200ld_rpath_suf = @ld_rpath_suf@
201localstatedir = @localstatedir@
202mandir = @mandir@
203oldincludedir = @oldincludedir@
204program_transform_name = @program_transform_name@
205sharedstatedir = @sharedstatedir@
206sysconfdir = @sysconfdir@
207INSTALL-L = ${INSTALL_DATA}
208
209
210##################################################################
211##################################################################
212#
213# *5* packaging options and directories
214#
215##################################################################
216
217pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
218pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
219
220# The basename of the ICU data file (i.e. icudt21b )
73c04bcf 221ICUDATA_CHAR = @ICUDATA_CHAR@
b75a7d8f
A
222ICUDATA_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
227ifeq ($(strip $(PKGDATA_MODE)),)
374ca955
A
228#SH# if [ "x$PKGDATA_MODE" = "x" ];
229#SH# then
b75a7d8f 230PKGDATA_MODE=@DATA_PACKAGING_MODE@
374ca955 231#SH# fi
b75a7d8f 232endif
374ca955
A
233
234#SH# case "$PKGDATA_MODE" in
b75a7d8f 235ifeq ($(PKGDATA_MODE),common)
374ca955 236#SH# common)
b75a7d8f
A
237ICUDATA_DIR = $(pkgdatadir)
238ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 239#SH# ;;
b75a7d8f
A
240else
241ifeq ($(PKGDATA_MODE),dll)
374ca955 242#SH# dll)
b75a7d8f
A
243ICUDATA_DIR = $(pkgdatadir)
244ICUPKGDATA_DIR = $(libdir)
374ca955 245#SH# ;;
b75a7d8f 246else
374ca955
A
247#SH# *)
248ICUDATA_DIR = $(pkgdatadir)
b75a7d8f 249ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 250#SH# ;;
b75a7d8f
A
251endif
252endif
253
374ca955
A
254#SH# esac
255
256GENCCODE_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
268include $(pkgdatadir)/config/@platform_make_fragment_name@
269