2000-10-24 19:50:20 +00:00
|
|
|
|
|
|
|
# Make definitions that are shared by the different subprojects of ICU.
|
|
|
|
#
|
|
|
|
# Yves Arrouye.
|
|
|
|
#
|
2004-03-26 01:22:25 +00:00
|
|
|
# Copyright (C) 2000-2004, International Business Machines Corporation and others.
|
2000-10-24 19:50:20 +00:00
|
|
|
# All Rights Reserved.
|
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
#
|
|
|
|
# Some of these variables are overridden in the config/mh-* files.
|
|
|
|
#
|
|
|
|
|
2000-10-24 19:50:20 +00:00
|
|
|
# Shell to use
|
|
|
|
|
|
|
|
SHELL = @SHELL@
|
|
|
|
|
|
|
|
# Standard directories
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
sbindir = @sbindir@
|
|
|
|
datadir = @datadir@
|
|
|
|
libdir = @libdir@
|
|
|
|
includedir = @includedir@
|
|
|
|
mandir = @mandir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
|
|
|
|
# Package information
|
|
|
|
|
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
VERSION = @VERSION@
|
|
|
|
UNICODE_VERSION = @UNICODE_VERSION@
|
2001-11-01 18:34:53 +00:00
|
|
|
SO_TARGET_VERSION = @LIB_VERSION@
|
|
|
|
SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
|
2000-10-24 19:50:20 +00:00
|
|
|
|
2001-12-21 20:10:23 +00:00
|
|
|
# The ICU data external name is usually icudata; the entry point name is
|
2004-06-15 17:49:56 +00:00
|
|
|
# the version-dependent name (for no particular reason except it was easier
|
2001-12-21 20:10:23 +00:00
|
|
|
# to change the build this way). When building in common mode, the data
|
|
|
|
# name is the versioned platform-dependent one.
|
|
|
|
|
2002-03-02 22:16:01 +00:00
|
|
|
ICUDATA_DIR = @pkgicudatadir@/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
|
2002-01-31 01:02:36 +00:00
|
|
|
|
2002-02-12 20:04:52 +00:00
|
|
|
ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@
|
2002-07-31 20:28:32 +00:00
|
|
|
ICUDATA_ENTRY_POINT = $(ICUDATA_BASENAME_VERSION)
|
2001-12-21 20:10:23 +00:00
|
|
|
ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)@ICUDATA_CHAR@
|
2004-05-17 06:37:28 +00:00
|
|
|
PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
2000-11-22 07:59:09 +00:00
|
|
|
ifeq ($(strip $(PKGDATA_MODE)),)
|
|
|
|
PKGDATA_MODE=@DATA_PACKAGING_MODE@
|
|
|
|
endif
|
|
|
|
ifeq ($(PKGDATA_MODE),common)
|
2001-12-21 20:10:23 +00:00
|
|
|
ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
|
2001-11-10 02:21:37 +00:00
|
|
|
ICUPKGDATA_DIR = $(ICUDATA_DIR)
|
2000-11-22 07:59:09 +00:00
|
|
|
else
|
2001-11-10 01:54:17 +00:00
|
|
|
ifeq ($(PKGDATA_MODE),dll)
|
2004-04-14 19:37:00 +00:00
|
|
|
ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
|
2004-04-19 17:32:30 +00:00
|
|
|
PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
|
2001-11-10 01:54:17 +00:00
|
|
|
ICUPKGDATA_DIR = $(libdir)
|
|
|
|
else
|
2004-06-15 17:49:56 +00:00
|
|
|
ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
|
2001-11-10 02:21:37 +00:00
|
|
|
ICUPKGDATA_DIR = $(ICUDATA_DIR)
|
2001-11-10 01:54:17 +00:00
|
|
|
endif
|
2000-11-22 07:59:09 +00:00
|
|
|
endif
|
2000-11-22 05:08:51 +00:00
|
|
|
|
2004-06-17 18:14:07 +00:00
|
|
|
# These are defined here because mh-cygwin-msvc needs to override these values.
|
|
|
|
ICUPKGDATA_INSTALL_DIR = $(DESTDIR)$(ICUPKGDATA_DIR)
|
|
|
|
ICUPKGDATA_INSTALL_LIBDIR = $(DESTDIR)$(libdir)
|
|
|
|
|
2004-03-02 00:38:39 +00:00
|
|
|
# If defined to a valid value, pkgdata will generate a data library more quickly
|
|
|
|
GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
|
|
|
|
|
2000-10-24 19:50:20 +00:00
|
|
|
# ICU specific directories
|
|
|
|
|
2002-03-02 22:16:01 +00:00
|
|
|
pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
|
|
|
|
pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
|
2002-03-02 22:25:56 +00:00
|
|
|
pkgsysconfdir = $(sysconfdir)/$(PACKAGE)$(ICULIBSUFFIX)
|
2000-10-24 19:50:20 +00:00
|
|
|
|
|
|
|
# Installation programs
|
|
|
|
|
|
|
|
MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
|
|
|
|
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
|
|
|
2001-09-21 03:41:21 +00:00
|
|
|
# Library suffix (to support different C++ compilers)
|
|
|
|
|
|
|
|
ICULIBSUFFIX=@ICULIBSUFFIX@
|
|
|
|
|
2000-10-24 19:50:20 +00:00
|
|
|
# Compiler and tools
|
|
|
|
|
2004-01-12 22:01:28 +00:00
|
|
|
ENABLE_DEBUG = @ENABLE_DEBUG@
|
|
|
|
ENABLE_RELEASE = @ENABLE_RELEASE@
|
2002-04-19 02:19:24 +00:00
|
|
|
EXEEXT = @EXEEXT@
|
2000-10-24 19:50:20 +00:00
|
|
|
CC = @CC@
|
|
|
|
CXX = @CXX@
|
2002-03-08 00:25:53 +00:00
|
|
|
AIX_SHLIB = @AIX_SHLIB@
|
2002-03-12 03:51:04 +00:00
|
|
|
AR = @AR@
|
2002-03-21 01:26:40 +00:00
|
|
|
ARFLAGS := @ARFLAGS@ $(ARFLAGS)
|
2002-03-12 03:51:04 +00:00
|
|
|
RANLIB = @RANLIB@
|
2003-05-23 03:45:30 +00:00
|
|
|
COMPILE_LINK_ENVVAR = @COMPILE_LINK_ENVVAR@
|
2000-10-24 19:50:20 +00:00
|
|
|
|
2002-04-19 02:19:24 +00:00
|
|
|
# Various flags for the tools
|
|
|
|
|
2004-07-18 09:00:39 +00:00
|
|
|
# DEFS is for common macro definitions.
|
|
|
|
# configure prevents user defined DEFS, and configure's DEFS is not needed
|
|
|
|
# So we ignore the DEFS that comes from configure
|
|
|
|
DEFS =
|
2002-05-13 23:51:50 +00:00
|
|
|
# CFLAGS is for C only flags
|
2002-04-19 02:19:24 +00:00
|
|
|
CFLAGS = @CFLAGS@
|
2002-05-13 23:51:50 +00:00
|
|
|
# CXXFLAGS is for C++ only flags
|
2002-04-19 02:19:24 +00:00
|
|
|
CXXFLAGS = @CXXFLAGS@
|
2002-05-13 23:51:50 +00:00
|
|
|
# CPPFLAGS is for C Pre-Processor flags
|
2002-07-30 21:16:13 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@
|
2002-05-13 23:51:50 +00:00
|
|
|
# DEFAULT_LIBS are the default libraries to link against
|
2002-04-19 02:19:24 +00:00
|
|
|
DEFAULT_LIBS = @LIBS@
|
2002-05-13 23:51:50 +00:00
|
|
|
# LIB_M is for linking against the math library
|
2002-04-19 02:19:24 +00:00
|
|
|
LIB_M = @LIB_M@
|
2003-02-11 00:13:48 +00:00
|
|
|
# OUTOPT is for creating a specific output name
|
|
|
|
OUTOPT = -o
|
2002-04-19 02:19:24 +00:00
|
|
|
|
|
|
|
ENABLE_RPATH = @ENABLE_RPATH@
|
|
|
|
ifeq ($(ENABLE_RPATH),YES)
|
|
|
|
RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
|
|
|
|
endif
|
|
|
|
LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
|
|
|
|
|
|
|
|
# What kind of libraries are we building and linking against?
|
|
|
|
ENABLE_STATIC = @ENABLE_STATIC@
|
|
|
|
ENABLE_SHARED = @ENABLE_SHARED@
|
|
|
|
|
2000-10-24 19:50:20 +00:00
|
|
|
# Echo w/o newline
|
|
|
|
|
2004-04-01 00:21:58 +00:00
|
|
|
#ECHO_N = @ECHO_N@
|
|
|
|
#ECHO_C = @ECHO_C@
|
2000-10-24 19:50:20 +00:00
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
# Commands to compile
|
2002-05-13 23:51:50 +00:00
|
|
|
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
|
|
|
|
COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c
|
2001-10-03 23:32:12 +00:00
|
|
|
|
|
|
|
# Commands to link
|
2002-05-13 23:51:50 +00:00
|
|
|
LINK.c= $(CC) $(CFLAGS) $(LDFLAGS)
|
|
|
|
LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
|
2001-10-03 23:32:12 +00:00
|
|
|
|
|
|
|
# Commands to make a shared library
|
2002-05-13 23:51:50 +00:00
|
|
|
SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared
|
|
|
|
SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
|
2001-10-03 23:32:12 +00:00
|
|
|
|
|
|
|
# Environment variable to set a runtime search path
|
|
|
|
LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
# Versioned target for a shared library.
|
|
|
|
FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
|
|
|
|
MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
|
|
|
|
|
|
|
|
## How ICU libraries are named... ex. $(LIBICU)uc$(SO)
|
|
|
|
# Prefix for the ICU library names
|
|
|
|
ICUPREFIX = icu
|
2004-04-05 21:24:22 +00:00
|
|
|
LIBPREFIX = lib
|
2004-04-28 06:34:25 +00:00
|
|
|
LIBICU = $(LIBPREFIX)$(ICUPREFIX)
|
2004-04-28 05:46:02 +00:00
|
|
|
|
|
|
|
## If we can't use the shared libraries, use the static libraries
|
|
|
|
ifneq ($(ENABLE_SHARED),YES)
|
2004-04-28 06:34:25 +00:00
|
|
|
STATIC_PREFIX_WHEN_USED = s
|
2004-04-28 05:46:02 +00:00
|
|
|
else
|
2004-04-28 06:34:25 +00:00
|
|
|
STATIC_PREFIX_WHEN_USED =
|
2004-04-28 05:46:02 +00:00
|
|
|
endif
|
2001-10-03 23:32:12 +00:00
|
|
|
|
2004-01-07 07:07:17 +00:00
|
|
|
# Static library prefix and file extension
|
|
|
|
STATIC_PREFIX = s
|
2004-04-05 21:24:22 +00:00
|
|
|
LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
|
2004-01-07 07:07:17 +00:00
|
|
|
A = a
|
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
# Force removal [for make clean]
|
|
|
|
RMV = rm -rf
|
2004-01-16 23:17:31 +00:00
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
# Platform commands to remove or move executable and library targets
|
2004-01-16 23:17:31 +00:00
|
|
|
# INSTALL-L installs libraries. Override in mh-* file to INSTALL_PROGRAM
|
|
|
|
# when the library needs to have executable permissions
|
2001-10-03 23:32:12 +00:00
|
|
|
INSTALL-S = $(INSTALL_PROGRAM)
|
|
|
|
INSTALL-L = $(INSTALL_DATA)
|
|
|
|
|
2004-03-26 01:22:25 +00:00
|
|
|
# Location of the libraries before "make install" is used
|
|
|
|
LIBDIR=$(top_builddir)/lib
|
|
|
|
|
|
|
|
# Location of the executables before "make install" is used
|
|
|
|
BINDIR=$(top_builddir)/bin
|
|
|
|
|
2004-03-31 22:33:46 +00:00
|
|
|
# Current full path directory.
|
|
|
|
CURR_FULL_DIR=$(shell pwd)
|
|
|
|
# Current full path directory for use in source code in a -D compiler option.
|
2004-04-01 04:58:52 +00:00
|
|
|
CURR_SRCCODE_FULL_DIR=$(shell pwd)
|
2004-03-31 22:33:46 +00:00
|
|
|
|
2004-04-19 17:32:30 +00:00
|
|
|
# Name flexibility for the library naming scheme. Any modifications should
|
|
|
|
# be made in the mh- file for the specific platform.
|
|
|
|
DATA_STUBNAME = data
|
|
|
|
COMMON_STUBNAME = uc
|
|
|
|
I18N_STUBNAME = i18n
|
|
|
|
LAYOUT_STUBNAME = le
|
|
|
|
LAYOUTEX_STUBNAME = lx
|
|
|
|
IO_STUBNAME = io
|
|
|
|
TOOLUTIL_STUBNAME = tu
|
|
|
|
CTESTFW_STUBNAME = test
|
|
|
|
|
2001-10-03 23:32:12 +00:00
|
|
|
# Link commands to link to ICU libs
|
2004-05-11 04:51:53 +00:00
|
|
|
LIBICUDT= -L$(LIBDIR) -L$(top_builddir)/stubdata -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
2004-04-28 06:34:25 +00:00
|
|
|
LIBICUUC= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) $(LIBICUDT)
|
|
|
|
LIBICUI18N= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
|
|
|
LIBICULE= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
|
|
|
LIBICULX= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
|
|
|
LIBCTESTFW= -L$(top_builddir)/tools/ctestfw -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
|
|
|
LIBICUTOOLUTIL= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
|
|
|
LIBICUIO= -L$(LIBDIR) -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
|
2001-10-03 23:32:12 +00:00
|
|
|
|
2001-10-31 18:43:45 +00:00
|
|
|
# Invoke, set library path for all ICU libraries.
|
2004-05-11 04:51:53 +00:00
|
|
|
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
|
2002-04-19 02:19:24 +00:00
|
|
|
|
|
|
|
# Platform-specific setup
|
|
|
|
include @platform_make_fragment@
|
|
|
|
|
2004-09-22 05:01:01 +00:00
|
|
|
# When shared libraries are disabled and static libraries are enabled,
|
|
|
|
# the C++ compiler must be used to link in the libraries for the tools.
|
|
|
|
ifneq ($(ENABLE_SHARED),YES)
|
|
|
|
LINK.c = $(LINK.cc)
|
|
|
|
endif
|
|
|
|
|