]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/Makefile.inc.in
ICU-6.2.22.tar.gz
[apple/icu.git] / icuSources / config / Makefile.inc.in
CommitLineData
b75a7d8f
A
1## -*-makefile-*-
2#******************************************************************************
374ca955 3# Copyright (C) 1999-2004, 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
82
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.
374ca955 89# - $(ICULIBS_ICUIO) - ICU stdio equivalent library
b75a7d8f
A
90
91ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
92ICULIBS_DATA = -l$(ICUPREFIX)data$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
93ICULIBS_I18N = -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 94ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f 95ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 96ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f
A
97ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
98ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
99ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
100ICULIBS_BASE = $(LIBS) -L$(libdir)
101
102# for icu-config to test with
103ICULIBS_COMMON_LIB_NAME = ${LIBICU}uc${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
104
105# ICULIBS is the set of libraries your application should link
106# with usually. Many applications will want to add $(ICULIBS_I18N) as well.
107ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
108
109##################################################################
110##################################################################
111#
112# *2* access to ICU tools
113#
114##################################################################
115# Environment variable to set a runtime search path
116# (Overridden when necessary in -mh files)
117LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
118
374ca955
A
119# Versioned target for a shared library
120FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
121MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
122
b75a7d8f
A
123# Access to important ICU tools.
124# Use as follows: $(INVOKE) $(GENRB) arguments ..
125INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
126GENCCODE = $(sbindir)/genccode
127GENCMN = $(sbindir)/gencmn
128GENRB = $(bindir)/genrb
129PKGDATA = $(bindir)/pkgdata
130
131##################################################################
132##################################################################
133#
134# *3* Information about the host
135#
136##################################################################
137
138# Information about the host that 'configure' was run on.
139host = @host@
140host_alias = @host_alias@
141host_cpu = @host_cpu@
142host_vendor = @host_vendor@
143host_os = @host_os@
144# Our platform canonical name (as determined by configure)
145# this is a #define value (i.e. U_XXXX or XXXX)
146platform = @platform@
147
148##################################################################
149##################################################################
150#
151# *4* compiler flags and misc. options
152#
153##################################################################
154AIX_SHLIB = @AIX_SHLIB@
155AR = @AR@
156CC = @CC@
157CFLAGS = @CFLAGS@
158CPP = @CPP@
159CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
160CXX = @CXX@
161CXXFLAGS = @CXXFLAGS@
162DEFAULT_MODE = @DATA_PACKAGING_MODE@
163DEFS = @DEFS@
164FFLAGS = @FFLAGS@
165INSTALL = @INSTALL@
166INSTALL_DATA = @INSTALL_DATA@
167INSTALL_DATA = @INSTALL_DATA@
168INSTALL_PROGRAM = @INSTALL_PROGRAM@
169INSTALL_PROGRAM = @INSTALL_PROGRAM@
170INSTALL_SCRIPT = @INSTALL_SCRIPT@
171LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
172LIBS = @LIBS@
173LIB_M = @LIB_M@
174LIB_VERSION = @LIB_VERSION@
175LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
176MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
177RANLIB = @RANLIB@
178RMV = rm -rf
179SHELL = @SHELL@
180SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
181SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
182U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
183includedir = @includedir@
184infodir = @infodir@
185ld_rpath_suf = @ld_rpath_suf@
186localstatedir = @localstatedir@
187mandir = @mandir@
188oldincludedir = @oldincludedir@
189program_transform_name = @program_transform_name@
190sharedstatedir = @sharedstatedir@
191sysconfdir = @sysconfdir@
192INSTALL-L = ${INSTALL_DATA}
193
194
195##################################################################
196##################################################################
197#
198# *5* packaging options and directories
199#
200##################################################################
201
202pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
203pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
204
205# The basename of the ICU data file (i.e. icudt21b )
206ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
207
208# Defaults for pkgdata's mode and directories
209# The default data dir changes depending on what packaging mode
210# is being used
211ifeq ($(strip $(PKGDATA_MODE)),)
374ca955
A
212#SH# if [ "x$PKGDATA_MODE" = "x" ];
213#SH# then
b75a7d8f 214PKGDATA_MODE=@DATA_PACKAGING_MODE@
374ca955 215#SH# fi
b75a7d8f 216endif
374ca955
A
217
218#SH# case "$PKGDATA_MODE" in
b75a7d8f 219ifeq ($(PKGDATA_MODE),common)
374ca955 220#SH# common)
b75a7d8f
A
221ICUDATA_DIR = $(pkgdatadir)
222ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 223#SH# ;;
b75a7d8f
A
224else
225ifeq ($(PKGDATA_MODE),dll)
374ca955 226#SH# dll)
b75a7d8f
A
227ICUDATA_DIR = $(pkgdatadir)
228ICUPKGDATA_DIR = $(libdir)
374ca955 229#SH# ;;
b75a7d8f 230else
374ca955
A
231#SH# *)
232ICUDATA_DIR = $(pkgdatadir)
b75a7d8f 233ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 234#SH# ;;
b75a7d8f
A
235endif
236endif
237
374ca955
A
238#SH# esac
239
240GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
b75a7d8f
A
241
242##################################################################
243##################################################################
244#
245# *6* Inclusion of platform make fragment (mh-* file)
246#
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.
251
252include $(pkgdatadir)/config/@platform_make_fragment_name@
253