]> git.saurik.com Git - apple/icu.git/blob - icuSources/config/Makefile.inc.in
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / config / Makefile.inc.in
1 ## -*-makefile-*-
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
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.
28 prefix = @prefix@
29 exec_prefix = @exec_prefix@
30 libdir = @libdir@
31 libexecdir = @libexecdir@
32 bindir = @bindir@
33 datadir = @datadir@
34 sbindir = @sbindir@
35
36 # about the ICU version
37 VERSION = @VERSION@
38 UNICODE_VERSION = @UNICODE_VERSION@
39
40 # The prefix for ICU libraries, normally 'icu'
41 ICUPREFIX = icu
42 PACKAGE = @PACKAGE@
43 LIBICU = lib$(ICUPREFIX)
44
45 # Static library prefix and file extension
46 STATIC_PREFIX = s
47 LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
48 A = a
49
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.
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
59 ENABLE_RPATH = @ENABLE_RPATH@
60 ifeq ($(ENABLE_RPATH),YES)
61 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
62 endif
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.
89 # - $(ICULIBS_ICUIO) - ICU stdio equivalent library
90
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)
101
102 # for icu-config to test with
103 ICULIBS_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.
107 ICULIBS = $(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)
117 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
118
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)
122
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
130
131 ##################################################################
132 ##################################################################
133 #
134 # *3* Information about the host
135 #
136 ##################################################################
137
138 # Information about the host that 'configure' was run on.
139 host = @host@
140 host_alias = @host_alias@
141 host_cpu = @host_cpu@
142 host_vendor = @host_vendor@
143 host_os = @host_os@
144 # Our platform canonical name (as determined by configure)
145 # this is a #define value (i.e. U_XXXX or XXXX)
146 platform = @platform@
147
148 ##################################################################
149 ##################################################################
150 #
151 # *4* compiler flags and misc. options
152 #
153 ##################################################################
154 AIX_SHLIB = @AIX_SHLIB@
155 AR = @AR@
156 CC = @CC@
157 CFLAGS = @CFLAGS@
158 CPP = @CPP@
159 CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
160 CXX = @CXX@
161 CXXFLAGS = @CXXFLAGS@
162 DEFAULT_MODE = @DATA_PACKAGING_MODE@
163 DEFS = @DEFS@
164 FFLAGS = @FFLAGS@
165 INSTALL = @INSTALL@
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)
172 LIBS = @LIBS@
173 LIB_M = @LIB_M@
174 LIB_VERSION = @LIB_VERSION@
175 LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
176 MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
177 RANLIB = @RANLIB@
178 RMV = rm -rf
179 SHELL = @SHELL@
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@
184 infodir = @infodir@
185 ld_rpath_suf = @ld_rpath_suf@
186 localstatedir = @localstatedir@
187 mandir = @mandir@
188 oldincludedir = @oldincludedir@
189 program_transform_name = @program_transform_name@
190 sharedstatedir = @sharedstatedir@
191 sysconfdir = @sysconfdir@
192 INSTALL-L = ${INSTALL_DATA}
193
194
195 ##################################################################
196 ##################################################################
197 #
198 # *5* packaging options and directories
199 #
200 ##################################################################
201
202 pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
203 pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
204
205 # The basename of the ICU data file (i.e. icudt21b )
206 ICUDATA_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
211 ifeq ($(strip $(PKGDATA_MODE)),)
212 #SH# if [ "x$PKGDATA_MODE" = "x" ];
213 #SH# then
214 PKGDATA_MODE=@DATA_PACKAGING_MODE@
215 #SH# fi
216 endif
217
218 #SH# case "$PKGDATA_MODE" in
219 ifeq ($(PKGDATA_MODE),common)
220 #SH# common)
221 ICUDATA_DIR = $(pkgdatadir)
222 ICUPKGDATA_DIR = $(ICUDATA_DIR)
223 #SH# ;;
224 else
225 ifeq ($(PKGDATA_MODE),dll)
226 #SH# dll)
227 ICUDATA_DIR = $(pkgdatadir)
228 ICUPKGDATA_DIR = $(libdir)
229 #SH# ;;
230 else
231 #SH# *)
232 ICUDATA_DIR = $(pkgdatadir)
233 ICUPKGDATA_DIR = $(ICUDATA_DIR)
234 #SH# ;;
235 endif
236 endif
237
238 #SH# esac
239
240 GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
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
252 include $(pkgdatadir)/config/@platform_make_fragment_name@
253