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