]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/Makefile.inc.in
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / config / Makefile.inc.in
1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 ## -*-makefile-*-
4 #******************************************************************************
5 # Copyright (C) 1999-2014, International Business Machines
6 # Corporation and others. All Rights Reserved.
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.
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 libdir = @libdir@
33 libexecdir = @libexecdir@
34 bindir = @bindir@
35 datarootdir = @datarootdir@
36 datadir = @datadir@
37 sbindir = @sbindir@
38
39 # about the ICU version
40 VERSION = @VERSION@
41 UNICODE_VERSION = @UNICODE_VERSION@
42
43 # The prefix for ICU libraries, normally 'icu'
44 ICUPREFIX = icu
45 PACKAGE = @PACKAGE@
46 LIBICU = lib$(ICUPREFIX)
47
48 # Static library prefix and file extension
49 STATIC_PREFIX = s
50 LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
51 A = a
52
53 # Suffix at the end of libraries. Usually empty.
54 ICULIBSUFFIX = @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
62 ENABLE_RPATH = @ENABLE_RPATH@
63 ifeq ($(ENABLE_RPATH),YES)
64 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
65 endif
66
67 #SH## icu-config version of above 'if':
68 #SH#case "x$ENABLE_RPATH" in
69 #SH# x[yY]*)
70 #SH# ENABLE_RPATH=YES
71 #SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
72 #SH# ;;
73 #SH#
74 #SH# x[nN]*)
75 #SH# ENABLE_RPATH=NO
76 #SH# RPATHLDFLAGS=""
77 #SH# ;;
78 #SH#
79 #SH# x)
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
90 # Name flexibility for the library naming scheme. Any modifications should
91 # be made in the mh- file for the specific platform.
92 DATA_STUBNAME = data
93 COMMON_STUBNAME = uc
94 I18N_STUBNAME = i18n
95 LAYOUTEX_STUBNAME = lx
96 IO_STUBNAME = io
97 TOOLUTIL_STUBNAME = tu
98 CTESTFW_STUBNAME = test
99
100
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.
107 # - $(ICULIBS_ICUIO) - ICU stdio equivalent library
108
109 ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
110 ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
111 ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
112 ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
113 ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
114 ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
115 ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
116 ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
117 ICULIBS_BASE = -L$(libdir)
118
119 # for icu-config to test with
120 ICULIBS_COMMON_LIB_NAME = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
121 ICULIBS_COMMON_LIB_NAME_A = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${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.
125 ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
126
127 # Proper echo newline handling is needed in icu-config
128 ECHO_N=@ICU_ECHO_N@
129 ECHO_C=@ICU_ECHO_C@
130 # Not currently being used but good to have for proper tab handling
131 ECHO_T=@ICU_ECHO_T@
132
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)
141 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
142
143 # Versioned target for a shared library
144 FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
145 MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
146
147 # Access to important ICU tools.
148 # Use as follows: $(INVOKE) $(GENRB) arguments ..
149 INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
150 GENCCODE = $(sbindir)/genccode
151 ICUPKG = $(sbindir)/icupkg
152 GENCMN = $(sbindir)/gencmn
153 GENRB = $(bindir)/genrb
154 PKGDATA = $(bindir)/pkgdata
155
156 # moved here because of dependencies
157 pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
158 pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
159
160 ##################################################################
161 ##################################################################
162 #
163 # *3* Information about the host
164 #
165 ##################################################################
166
167 # Information about the host that 'configure' was run on.
168 host = @host@
169 host_alias = @host_alias@
170 host_cpu = @host_cpu@
171 host_vendor = @host_vendor@
172 host_os = @host_os@
173 # Our platform canonical name (as determined by configure)
174 # this is a #define value (i.e. U_XXXX or XXXX)
175 platform = @platform@
176
177 ##################################################################
178 ##################################################################
179 #
180 # *4* compiler flags and misc. options
181 #
182 ##################################################################
183 AR = @AR@
184 # initial tab keeps it out of the shell version.
185 ARFLAGS := @ARFLAGS@ $(ARFLAGS)
186 #SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}"
187 CC = @CC@
188 CPP = @CPP@
189 CFLAGS = @UCONFIG_CFLAGS@
190 CPPFLAGS = @UCONFIG_CPPFLAGS@ -I$(prefix)/include
191 CXXFLAGS = @UCONFIG_CXXFLAGS@
192 CXX = @CXX@
193 DEFAULT_MODE = @DATA_PACKAGING_MODE@
194 DEFS = @DEFS@
195 # use a consistent INSTALL
196 INSTALL = $(SHELL) $(pkgdatadir)/install-sh -c
197 INSTALL_DATA = @INSTALL_DATA@
198 INSTALL_DATA = @INSTALL_DATA@
199 INSTALL_PROGRAM = @INSTALL_PROGRAM@
200 INSTALL_PROGRAM = @INSTALL_PROGRAM@
201 INSTALL_SCRIPT = @INSTALL_SCRIPT@
202 LDFLAGS = $(RPATHLDFLAGS)
203 LIBS = @LIBS@
204 LIB_M = @LIB_M@
205 LIB_VERSION = @LIB_VERSION@
206 LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
207 MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
208 RANLIB = @RANLIB@
209 RMV = rm -rf
210 SHELL = @SHELL@
211 SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
212 SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
213 U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
214 includedir = @includedir@
215 infodir = @infodir@
216 localstatedir = @localstatedir@
217 mandir = @mandir@
218 oldincludedir = @oldincludedir@
219 program_transform_name = @program_transform_name@
220 sharedstatedir = @sharedstatedir@
221 sysconfdir = @sysconfdir@
222 INSTALL-L = ${INSTALL_DATA}
223
224 # for derivative builds - don't bother with VERBOSE/NONVERBOSE SILENT_COMPILE
225 SILENT_COMPILE=$(1) #M#
226 ICU_MSG=@echo " $(1) " #M#
227
228 ##################################################################
229 ##################################################################
230 #
231 # *5* packaging options and directories
232 #
233 ##################################################################
234
235
236 # The basename of the ICU data file (i.e. icudt21b )
237 ICUDATA_CHAR = @ICUDATA_CHAR@
238 ICUDATA_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
243 ifeq ($(strip $(PKGDATA_MODE)),)
244 #SH# if [ "x$PKGDATA_MODE" = "x" ];
245 #SH# then
246 PKGDATA_MODE=@DATA_PACKAGING_MODE@
247 #SH# fi
248 endif
249
250 #SH# case "$PKGDATA_MODE" in
251 ifeq ($(PKGDATA_MODE),common)
252 #SH# common)
253 ICUDATA_DIR = $(pkgdatadir)
254 ICUPKGDATA_DIR = $(ICUDATA_DIR)
255 #SH# ;;
256 else
257 ifeq ($(PKGDATA_MODE),dll)
258 #SH# dll)
259 ICUDATA_DIR = $(pkgdatadir)
260 ICUPKGDATA_DIR = $(libdir)
261 #SH# ;;
262 else
263 #SH# *)
264 ICUDATA_DIR = $(pkgdatadir)
265 ICUPKGDATA_DIR = $(ICUDATA_DIR)
266 #SH# ;;
267 endif
268 endif
269
270 #SH# esac
271
272 GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
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.
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.
285
286 ifeq (selfcheck,$(MAKECMDGOALS)) #M#
287 selfcheck: #M#
288 @echo passed #M#
289 else #M#
290 include $(pkgdatadir)/config/@platform_make_fragment_name@
291 endif #M#
292