]> git.saurik.com Git - apple/icu.git/blame - icuSources/config/Makefile.inc.in
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / config / Makefile.inc.in
CommitLineData
f3c0d7a5
A
1# Copyright (C) 2016 and later: Unicode, Inc. and others.
2# License & terms of use: http://www.unicode.org/copyright.html
b75a7d8f
A
3## -*-makefile-*-
4#******************************************************************************
b331163b 5# Copyright (C) 1999-2014, International Business Machines
b75a7d8f 6# Corporation and others. All Rights Reserved.
b75a7d8f
A
7#******************************************************************************
8# This Makefile.inc is designed to be included into projects which make use
9# of the ICU.
10
11# CONTENTS OF THIS FILE
12# 1). Base configuration information and linkage
13# 2). Variables giving access to ICU tools
14# 3). Host information
15# 4). Compiler flags and settings
16# 5). Data Packaging directives
17# 6). Include of platform make fragment (mh-* file)
18
19##################################################################
20##################################################################
21#
22# *1* base configuration information and linkage
23#
24##################################################################
25# The PREFIX is the base of where ICU is installed.
26# Inside this directory you should find bin, lib, include/unicode,
27# etc. If ICU is not installed in this directory, you must change the
28# following line. There should exist $(prefix)/include/unicode/utypes.h
29# for example.
30prefix = @prefix@
31exec_prefix = @exec_prefix@
32libdir = @libdir@
33libexecdir = @libexecdir@
34bindir = @bindir@
46f4442e 35datarootdir = @datarootdir@
b75a7d8f
A
36datadir = @datadir@
37sbindir = @sbindir@
38
39# about the ICU version
40VERSION = @VERSION@
41UNICODE_VERSION = @UNICODE_VERSION@
42
43# The prefix for ICU libraries, normally 'icu'
44ICUPREFIX = icu
45PACKAGE = @PACKAGE@
46LIBICU = lib$(ICUPREFIX)
47
374ca955
A
48# Static library prefix and file extension
49STATIC_PREFIX = s
50LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
51A = a
52
b75a7d8f
A
53# Suffix at the end of libraries. Usually empty.
54ICULIBSUFFIX = @ICULIBSUFFIX@
55# ICULIBSUFFIX_VERSION is non-empty if it is to contain a library
56# version. For example, if it is 21, it means libraries are named
57# libicuuc21.so for example.
58
59# rpath links a library search path right into the binaries.
60## mh-files MUST NOT override RPATHLDFLAGS unless they provide
61## equivalent '#SH#' lines for icu-config fixup
62ENABLE_RPATH = @ENABLE_RPATH@
63ifeq ($(ENABLE_RPATH),YES)
64RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
65endif
66
67#SH## icu-config version of above 'if':
4388f060
A
68#SH#case "x$ENABLE_RPATH" in
69#SH# x[yY]*)
b75a7d8f
A
70#SH# ENABLE_RPATH=YES
71#SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
72#SH# ;;
73#SH#
4388f060
A
74#SH# x[nN]*)
75#SH# ENABLE_RPATH=NO
76#SH# RPATHLDFLAGS=""
77#SH# ;;
78#SH#
79#SH# x)
b75a7d8f
A
80#SH# ENABLE_RPATH=NO
81#SH# RPATHLDFLAGS=""
82#SH# ;;
83#SH#
84#SH# *)
85#SH# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2
86#SH# exit 3
87#SH# ;;
88#SH#esac
89
73c04bcf
A
90# Name flexibility for the library naming scheme. Any modifications should
91# be made in the mh- file for the specific platform.
92DATA_STUBNAME = data
93COMMON_STUBNAME = uc
94I18N_STUBNAME = i18n
73c04bcf
A
95LAYOUTEX_STUBNAME = lx
96IO_STUBNAME = io
97TOOLUTIL_STUBNAME = tu
98CTESTFW_STUBNAME = test
99
100
b75a7d8f
A
101
102### To link your application with ICU:
103# 1. use LDFLAGS, CFLAGS, etc from above
104# 2. link with $(ICULIBS)
105# 3. optionally, add one or more of:
106# - $(ICULIBS_I18N) - i18n library, formatting, etc.
374ca955 107# - $(ICULIBS_ICUIO) - ICU stdio equivalent library
b75a7d8f
A
108
109ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
73c04bcf
A
110ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
111ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 112ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f 113ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
374ca955 114ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f 115ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
b75a7d8f 116ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
57a6839d 117ICULIBS_BASE = -L$(libdir)
b75a7d8f
A
118
119# for icu-config to test with
729e4ab9
A
120ICULIBS_COMMON_LIB_NAME = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
121ICULIBS_COMMON_LIB_NAME_A = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}
b75a7d8f
A
122
123# ICULIBS is the set of libraries your application should link
124# with usually. Many applications will want to add $(ICULIBS_I18N) as well.
125ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
126
729e4ab9
A
127# Proper echo newline handling is needed in icu-config
128ECHO_N=@ICU_ECHO_N@
129ECHO_C=@ICU_ECHO_C@
130# Not currently being used but good to have for proper tab handling
131ECHO_T=@ICU_ECHO_T@
132
b75a7d8f
A
133##################################################################
134##################################################################
135#
136# *2* access to ICU tools
137#
138##################################################################
139# Environment variable to set a runtime search path
140# (Overridden when necessary in -mh files)
141LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
142
374ca955
A
143# Versioned target for a shared library
144FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
145MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
146
b75a7d8f
A
147# Access to important ICU tools.
148# Use as follows: $(INVOKE) $(GENRB) arguments ..
149INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
150GENCCODE = $(sbindir)/genccode
46f4442e 151ICUPKG = $(sbindir)/icupkg
b75a7d8f
A
152GENCMN = $(sbindir)/gencmn
153GENRB = $(bindir)/genrb
154PKGDATA = $(bindir)/pkgdata
155
46f4442e
A
156# moved here because of dependencies
157pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
158pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
159
b75a7d8f
A
160##################################################################
161##################################################################
162#
163# *3* Information about the host
164#
165##################################################################
166
167# Information about the host that 'configure' was run on.
168host = @host@
169host_alias = @host_alias@
170host_cpu = @host_cpu@
171host_vendor = @host_vendor@
172host_os = @host_os@
173# Our platform canonical name (as determined by configure)
174# this is a #define value (i.e. U_XXXX or XXXX)
175platform = @platform@
176
177##################################################################
178##################################################################
179#
180# *4* compiler flags and misc. options
181#
182##################################################################
b75a7d8f 183AR = @AR@
73c04bcf
A
184# initial tab keeps it out of the shell version.
185 ARFLAGS := @ARFLAGS@ $(ARFLAGS)
186#SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}"
b75a7d8f 187CC = @CC@
b75a7d8f 188CPP = @CPP@
57a6839d
A
189CFLAGS = @UCONFIG_CFLAGS@
190CPPFLAGS = @UCONFIG_CPPFLAGS@ -I$(prefix)/include
191CXXFLAGS = @UCONFIG_CXXFLAGS@
b75a7d8f 192CXX = @CXX@
b75a7d8f
A
193DEFAULT_MODE = @DATA_PACKAGING_MODE@
194DEFS = @DEFS@
46f4442e
A
195# use a consistent INSTALL
196INSTALL = $(SHELL) $(pkgdatadir)/install-sh -c
b75a7d8f
A
197INSTALL_DATA = @INSTALL_DATA@
198INSTALL_DATA = @INSTALL_DATA@
199INSTALL_PROGRAM = @INSTALL_PROGRAM@
200INSTALL_PROGRAM = @INSTALL_PROGRAM@
201INSTALL_SCRIPT = @INSTALL_SCRIPT@
57a6839d 202LDFLAGS = $(RPATHLDFLAGS)
b75a7d8f
A
203LIBS = @LIBS@
204LIB_M = @LIB_M@
205LIB_VERSION = @LIB_VERSION@
206LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
207MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
208RANLIB = @RANLIB@
209RMV = rm -rf
210SHELL = @SHELL@
211SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
212SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
213U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
214includedir = @includedir@
215infodir = @infodir@
b75a7d8f
A
216localstatedir = @localstatedir@
217mandir = @mandir@
218oldincludedir = @oldincludedir@
219program_transform_name = @program_transform_name@
220sharedstatedir = @sharedstatedir@
221sysconfdir = @sysconfdir@
222INSTALL-L = ${INSTALL_DATA}
223
51004dcb
A
224# for derivative builds - don't bother with VERBOSE/NONVERBOSE SILENT_COMPILE
225SILENT_COMPILE=$(1) #M#
226ICU_MSG=@echo " $(1) " #M#
b75a7d8f
A
227
228##################################################################
229##################################################################
230#
231# *5* packaging options and directories
232#
233##################################################################
234
b75a7d8f
A
235
236# The basename of the ICU data file (i.e. icudt21b )
73c04bcf 237ICUDATA_CHAR = @ICUDATA_CHAR@
b75a7d8f
A
238ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
239
240# Defaults for pkgdata's mode and directories
241# The default data dir changes depending on what packaging mode
242# is being used
243ifeq ($(strip $(PKGDATA_MODE)),)
374ca955
A
244#SH# if [ "x$PKGDATA_MODE" = "x" ];
245#SH# then
b75a7d8f 246PKGDATA_MODE=@DATA_PACKAGING_MODE@
374ca955 247#SH# fi
b75a7d8f 248endif
374ca955
A
249
250#SH# case "$PKGDATA_MODE" in
b75a7d8f 251ifeq ($(PKGDATA_MODE),common)
374ca955 252#SH# common)
b75a7d8f
A
253ICUDATA_DIR = $(pkgdatadir)
254ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 255#SH# ;;
b75a7d8f
A
256else
257ifeq ($(PKGDATA_MODE),dll)
374ca955 258#SH# dll)
b75a7d8f
A
259ICUDATA_DIR = $(pkgdatadir)
260ICUPKGDATA_DIR = $(libdir)
374ca955 261#SH# ;;
b75a7d8f 262else
374ca955
A
263#SH# *)
264ICUDATA_DIR = $(pkgdatadir)
b75a7d8f 265ICUPKGDATA_DIR = $(ICUDATA_DIR)
374ca955 266#SH# ;;
b75a7d8f
A
267endif
268endif
269
374ca955
A
270#SH# esac
271
272GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
b75a7d8f
A
273
274##################################################################
275##################################################################
276#
277# *6* Inclusion of platform make fragment (mh-* file)
278#
279##################################################################
280# The mh- file ("make fragment") for the platform is included here.
281# It may override the above settings.
282# It is put last so that the mh-file can override anything.
729e4ab9
A
283# The selfcheck is just a sanity check that this makefile is
284# parseable. The mh fragment is only included if this does not occur.
b75a7d8f 285
729e4ab9
A
286ifeq (selfcheck,$(MAKECMDGOALS)) #M#
287selfcheck: #M#
288 @echo passed #M#
289else #M#
b75a7d8f 290include $(pkgdatadir)/config/@platform_make_fragment_name@
729e4ab9 291endif #M#
b75a7d8f 292