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