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