]> git.saurik.com Git - apple/icu.git/blob - icuSources/icudefs.mk.in
ICU-400.39.tar.gz
[apple/icu.git] / icuSources / icudefs.mk.in
1 # Make definitions that are shared by the different subprojects of ICU.
2 #
3 # Yves Arrouye.
4 #
5 # Copyright (C) 2000-2008, International Business Machines Corporation and others.
6 # All Rights Reserved.
7
8 #
9 # Some of these variables are overridden in the config/mh-* files.
10 #
11 # Please be sure to update config/Makefile.inc.in if you add something here.
12 #
13
14 # Shell to use
15
16 SHELL = @SHELL@
17
18 # Standard directories
19
20 prefix = @prefix@
21 exec_prefix = @exec_prefix@
22
23 bindir = @bindir@
24 sbindir = @sbindir@
25 datarootdir = @datarootdir@
26 datadir = @datadir@
27 libdir = @libdir@
28 includedir = @includedir@
29 mandir = @mandir@
30 sysconfdir = @sysconfdir@
31
32 # Package information
33
34 PACKAGE = @PACKAGE@
35 VERSION = @VERSION@
36 UNICODE_VERSION = @UNICODE_VERSION@
37 SO_TARGET_VERSION = @LIB_VERSION@
38 SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
39
40 # The ICU data external name is usually icudata; the entry point name is
41 # the version-dependent name (for no particular reason except it was easier
42 # to change the build this way). When building in common mode, the data
43 # name is the versioned platform-dependent one.
44
45 ICUDATA_DIR = @pkgicudatadir@/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
46
47 ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@
48 ICUDATA_ENTRY_POINT = $(ICUDATA_BASENAME_VERSION)
49 ICUDATA_CHAR = @ICUDATA_CHAR@
50 ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)$(ICUDATA_CHAR)
51 PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
52 ifeq ($(strip $(PKGDATA_MODE)),)
53 PKGDATA_MODE=@DATA_PACKAGING_MODE@
54 endif
55 ifeq ($(PKGDATA_MODE),common)
56 ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
57 ICUPKGDATA_DIR = $(ICUDATA_DIR)
58 else
59 ifeq ($(PKGDATA_MODE),dll)
60 ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
61 PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
62 ICUPKGDATA_DIR = $(libdir)
63 else
64 ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
65 ICUPKGDATA_DIR = $(ICUDATA_DIR)
66 endif
67 endif
68 # This is needed so that make -j2 doesn't complain when invoking pkgdata's make
69 PKGDATA_INVOKE_OPTS = MAKEFLAGS=
70
71 # These are defined here because mh-cygwin-msvc needs to override these values.
72 ICUPKGDATA_INSTALL_DIR = $(DESTDIR)$(ICUPKGDATA_DIR)
73 ICUPKGDATA_INSTALL_LIBDIR = $(DESTDIR)$(libdir)
74
75 # If defined to a valid value, pkgdata will generate a data library more quickly
76 GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
77
78 # ICU specific directories
79
80 pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
81 pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
82 pkgsysconfdir = $(sysconfdir)/$(PACKAGE)$(ICULIBSUFFIX)
83
84 # Installation programs
85
86 MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
87
88 INSTALL = @INSTALL@
89 INSTALL_PROGRAM = @INSTALL_PROGRAM@
90 INSTALL_DATA = @INSTALL_DATA@
91 INSTALL_SCRIPT = @INSTALL_SCRIPT@
92
93 # Library suffix (to support different C++ compilers)
94
95 ICULIBSUFFIX=@ICULIBSUFFIX@
96
97 # Compiler and tools
98
99 ENABLE_DEBUG = @ENABLE_DEBUG@
100 ENABLE_RELEASE = @ENABLE_RELEASE@
101 EXEEXT = @EXEEXT@
102 CC = @CC@
103 CXX = @CXX@
104 AR = @AR@
105 ARFLAGS = @ARFLAGS@ r
106 RANLIB = @RANLIB@
107 COMPILE_LINK_ENVVAR = @COMPILE_LINK_ENVVAR@
108
109 # Various flags for the tools
110
111 # DEFS is for common macro definitions.
112 # configure prevents user defined DEFS, and configure's DEFS is not needed
113 # So we ignore the DEFS that comes from configure
114 DEFS =
115 # CFLAGS is for C only flags
116 CFLAGS = @CFLAGS@
117 # CXXFLAGS is for C++ only flags
118 CXXFLAGS = @CXXFLAGS@
119 # CPPFLAGS is for C Pre-Processor flags
120 CPPFLAGS = @CPPFLAGS@
121 # LIBCFLAGS are the flags for static and shared libraries.
122 LIBCFLAGS = @LIBCFLAGS@
123 # LIBCXXFLAGS are the flags for static and shared libraries.
124 LIBCXXFLAGS = @LIBCXXFLAGS@
125 # DEFAULT_LIBS are the default libraries to link against
126 DEFAULT_LIBS = @LIBS@
127 # LIB_M is for linking against the math library
128 LIB_M = @LIB_M@
129 # LIB_THREAD is for linking against the threading library
130 LIB_THREAD = @LIB_THREAD@
131 # OUTOPT is for creating a specific output name
132 OUTOPT = -o # The extra space after the argument is needed.
133 # AR_OUTOPT is for creating a specific output name for static libraries.
134 AR_OUTOPT =
135
136 ENABLE_RPATH = @ENABLE_RPATH@
137 ifeq ($(ENABLE_RPATH),YES)
138 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
139 endif
140 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
141
142 # What kind of libraries are we building and linking against?
143 ENABLE_STATIC = @ENABLE_STATIC@
144 ENABLE_SHARED = @ENABLE_SHARED@
145
146 # Echo w/o newline
147
148 #ECHO_N = @ECHO_N@
149 #ECHO_C = @ECHO_C@
150
151 # Commands to compile
152 COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
153 COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c
154
155 # Commands to link
156 LINK.c= $(CC) $(CFLAGS) $(LDFLAGS)
157 LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
158
159 # Commands to make a shared library
160 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
161 SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
162
163 # Environment variable to set a runtime search path
164 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
165
166 # Versioned target for a shared library.
167 FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
168 MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
169 SHARED_OBJECT = $(FINAL_SO_TARGET)
170
171 ## How ICU libraries are named... ex. $(LIBICU)uc$(SO)
172 # Prefix for the ICU library names
173 ICUPREFIX = icu
174 LIBPREFIX = lib
175 LIBICU = $(LIBPREFIX)$(ICUPREFIX)
176
177 ## If we can't use the shared libraries, use the static libraries
178 ifneq ($(ENABLE_SHARED),YES)
179 STATIC_PREFIX_WHEN_USED = s
180 else
181 STATIC_PREFIX_WHEN_USED =
182 endif
183
184 # Static library prefix and file extension
185 STATIC_PREFIX = s
186 LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
187 A = a
188 SOBJ = $(SO)
189
190 # Force removal [for make clean]
191 RMV = rm -rf
192
193 # Platform commands to remove or move executable and library targets
194 # INSTALL-L installs libraries. Override in mh-* file to INSTALL_PROGRAM
195 # when the library needs to have executable permissions
196 INSTALL-S = $(INSTALL_PROGRAM)
197 INSTALL-L = $(INSTALL_PROGRAM)
198 #INSTALL-L = $(INSTALL_DATA)
199
200 # Location of the libraries before "make install" is used
201 LIBDIR=$(top_builddir)/lib
202
203 # Location of the executables before "make install" is used
204 BINDIR=$(top_builddir)/bin
205
206 # Current full path directory.
207 CURR_FULL_DIR=$(shell pwd)
208 # Current full path directory for use in source code in a -D compiler option.
209 CURR_SRCCODE_FULL_DIR=$(shell pwd)
210
211 # Name flexibility for the library naming scheme. Any modifications should
212 # be made in the mh- file for the specific platform.
213 DATA_STUBNAME = data
214 COMMON_STUBNAME = uc
215 I18N_STUBNAME = i18n
216 LAYOUT_STUBNAME = le
217 LAYOUTEX_STUBNAME = lx
218 IO_STUBNAME = io
219 TOOLUTIL_STUBNAME = tu
220 CTESTFW_STUBNAME = test
221
222 # Link commands to link to ICU libs
223 LIBICUDT= -L$(LIBDIR) -L$(top_builddir)/stubdata -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
224 LIBICUUC= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) $(LIBICUDT)
225 LIBICUI18N= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
226 LIBICULE= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
227 LIBICULX= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
228 LIBCTESTFW= -L$(top_builddir)/tools/ctestfw -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
229 LIBICUTOOLUTIL= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
230 LIBICUIO= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
231
232 # Invoke, set library path for all ICU libraries.
233 INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
234
235 # Platform-specific setup
236 include @platform_make_fragment@
237
238 # When shared libraries are disabled and static libraries are enabled,
239 # the C++ compiler must be used to link in the libraries for the tools.
240 ifneq ($(ENABLE_SHARED),YES)
241 LINK.c = $(LINK.cc)
242 endif
243