2000-06-29 02:34:31 +00:00
|
|
|
## -*-makefile-*-
|
2000-01-14 16:19:24 +00:00
|
|
|
#******************************************************************************
|
2010-02-27 06:38:11 +00:00
|
|
|
# Copyright (C) 1999-2010, International Business Machines
|
2000-01-14 16:19:24 +00:00
|
|
|
# Corporation and others. All Rights Reserved.
|
|
|
|
#******************************************************************************
|
2002-05-07 03:10:28 +00:00
|
|
|
# This Makefile.inc is designed to be included into projects which make use
|
1999-10-13 06:17:37 +00:00
|
|
|
# of the ICU.
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# CONTENTS OF THIS FILE
|
|
|
|
# 1). Base configuration information and linkage
|
|
|
|
# 2). Variables giving access to ICU tools
|
|
|
|
# 3). Host information
|
|
|
|
# 4). Compiler flags and settings
|
|
|
|
# 5). Data Packaging directives
|
|
|
|
# 6). Include of platform make fragment (mh-* file)
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *1* base configuration information and linkage
|
|
|
|
#
|
|
|
|
##################################################################
|
|
|
|
# The PREFIX is the base of where ICU is installed.
|
|
|
|
# Inside this directory you should find bin, lib, include/unicode,
|
|
|
|
# etc. If ICU is not installed in this directory, you must change the
|
|
|
|
# following line. There should exist $(prefix)/include/unicode/utypes.h
|
|
|
|
# for example.
|
2000-10-13 00:26:21 +00:00
|
|
|
prefix = @prefix@
|
2002-05-07 03:10:28 +00:00
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
libdir = @libdir@
|
2000-10-13 00:26:21 +00:00
|
|
|
libexecdir = @libexecdir@
|
2002-05-07 03:10:28 +00:00
|
|
|
bindir = @bindir@
|
2008-05-29 20:41:30 +00:00
|
|
|
datarootdir = @datarootdir@
|
2000-10-13 00:26:21 +00:00
|
|
|
datadir = @datadir@
|
2002-05-07 03:10:28 +00:00
|
|
|
sbindir = @sbindir@
|
|
|
|
|
|
|
|
# about the ICU version
|
2000-10-13 00:26:21 +00:00
|
|
|
VERSION = @VERSION@
|
2002-05-07 03:10:28 +00:00
|
|
|
UNICODE_VERSION = @UNICODE_VERSION@
|
2001-11-12 19:22:28 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# The prefix for ICU libraries, normally 'icu'
|
|
|
|
ICUPREFIX = icu
|
|
|
|
PACKAGE = @PACKAGE@
|
|
|
|
LIBICU = lib$(ICUPREFIX)
|
1999-10-13 06:17:37 +00:00
|
|
|
|
2004-01-07 07:07:17 +00:00
|
|
|
# Static library prefix and file extension
|
|
|
|
STATIC_PREFIX = s
|
|
|
|
LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
|
|
|
|
A = a
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# Suffix at the end of libraries. Usually empty.
|
|
|
|
ICULIBSUFFIX = @ICULIBSUFFIX@
|
|
|
|
# ICULIBSUFFIX_VERSION is non-empty if it is to contain a library
|
|
|
|
# version. For example, if it is 21, it means libraries are named
|
|
|
|
# libicuuc21.so for example.
|
2000-10-13 00:26:21 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# rpath links a library search path right into the binaries.
|
2002-05-23 23:44:58 +00:00
|
|
|
## mh-files MUST NOT override RPATHLDFLAGS unless they provide
|
|
|
|
## equivalent '#SH#' lines for icu-config fixup
|
2002-05-07 03:10:28 +00:00
|
|
|
ENABLE_RPATH = @ENABLE_RPATH@
|
|
|
|
ifeq ($(ENABLE_RPATH),YES)
|
|
|
|
RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
|
|
|
|
endif
|
2000-10-24 19:50:20 +00:00
|
|
|
|
2002-05-23 23:44:58 +00:00
|
|
|
#SH## icu-config version of above 'if':
|
|
|
|
#SH#case "$ENABLE_RPATH" in
|
|
|
|
#SH# [yY]*)
|
|
|
|
#SH# ENABLE_RPATH=YES
|
|
|
|
#SH# RPATHLDFLAGS="${LD_RPATH}${LD_RPATH_PRE}${libdir}"
|
|
|
|
#SH# ;;
|
|
|
|
#SH#
|
|
|
|
#SH# [nN]*)
|
|
|
|
#SH# ENABLE_RPATH=NO
|
|
|
|
#SH# RPATHLDFLAGS=""
|
|
|
|
#SH# ;;
|
|
|
|
#SH#
|
|
|
|
#SH# *)
|
|
|
|
#SH# echo $0: Unknown --enable-rpath value ${ENABLE_RPATH} 1>&2
|
|
|
|
#SH# exit 3
|
|
|
|
#SH# ;;
|
|
|
|
#SH#esac
|
|
|
|
|
2005-07-22 22:58:08 +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
|
|
|
|
|
|
|
|
|
1999-10-13 06:17:37 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
### To link your application with ICU:
|
|
|
|
# 1. use LDFLAGS, CFLAGS, etc from above
|
|
|
|
# 2. link with $(ICULIBS)
|
|
|
|
# 3. optionally, add one or more of:
|
|
|
|
# - $(ICULIBS_I18N) - i18n library, formatting, etc.
|
|
|
|
# - $(ICULIBS_LAYOUT) - ICU layout library.
|
2004-04-01 00:21:58 +00:00
|
|
|
# - $(ICULIBS_ICUIO) - ICU stdio equivalent library
|
2002-05-07 03:10:28 +00:00
|
|
|
|
2002-05-31 19:18:29 +00:00
|
|
|
ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2005-07-22 22:58:08 +00:00
|
|
|
ICULIBS_DATA = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
|
|
|
ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2004-04-01 00:21:58 +00:00
|
|
|
ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2002-05-31 19:18:29 +00:00
|
|
|
ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2004-04-01 00:21:58 +00:00
|
|
|
ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2003-03-07 17:39:09 +00:00
|
|
|
ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2002-05-31 19:18:29 +00:00
|
|
|
ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2003-04-29 20:49:57 +00:00
|
|
|
ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
|
2002-05-07 03:10:28 +00:00
|
|
|
ICULIBS_BASE = $(LIBS) -L$(libdir)
|
|
|
|
|
|
|
|
# for icu-config to test with
|
2010-02-27 06:38:11 +00:00
|
|
|
ICULIBS_COMMON_LIB_NAME = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}
|
|
|
|
ICULIBS_COMMON_LIB_NAME_A = ${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}
|
2002-05-07 03:10:28 +00:00
|
|
|
|
|
|
|
# ICULIBS is the set of libraries your application should link
|
|
|
|
# with usually. Many applications will want to add $(ICULIBS_I18N) as well.
|
|
|
|
ICULIBS = $(ICULIBS_BASE) $(ICULIBS_I18N) $(ICULIBS_COMMON) $(ICULIBS_DATA)
|
|
|
|
|
2008-08-08 18:01:18 +00:00
|
|
|
# Proper echo newline handling is needed in icu-config
|
2010-06-17 19:50:26 +00:00
|
|
|
ECHO_N=@ICU_ECHO_N@
|
|
|
|
ECHO_C=@ICU_ECHO_C@
|
2008-08-08 21:11:42 +00:00
|
|
|
# Not currently being used but good to have for proper tab handling
|
2010-06-17 19:50:26 +00:00
|
|
|
ECHO_T=@ICU_ECHO_T@
|
2008-08-08 18:01:18 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *2* access to ICU tools
|
|
|
|
#
|
|
|
|
##################################################################
|
|
|
|
# Environment variable to set a runtime search path
|
|
|
|
# (Overridden when necessary in -mh files)
|
|
|
|
LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
|
|
|
|
|
2004-06-01 23:12:21 +00:00
|
|
|
# Versioned target for a shared library
|
|
|
|
FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
|
|
|
|
MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# Access to important ICU tools.
|
|
|
|
# Use as follows: $(INVOKE) $(GENRB) arguments ..
|
2003-04-23 20:59:32 +00:00
|
|
|
INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
|
2002-05-07 03:10:28 +00:00
|
|
|
GENCCODE = $(sbindir)/genccode
|
2006-11-28 00:42:10 +00:00
|
|
|
ICUPKG = $(sbindir)/icupkg
|
2007-07-10 19:26:05 +00:00
|
|
|
GENCMN = $(sbindir)/gencmn
|
2002-05-29 22:03:35 +00:00
|
|
|
GENRB = $(bindir)/genrb
|
|
|
|
PKGDATA = $(bindir)/pkgdata
|
2002-05-07 03:10:28 +00:00
|
|
|
|
2008-05-29 20:41:30 +00:00
|
|
|
# moved here because of dependencies
|
|
|
|
pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
|
|
|
|
pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *3* Information about the host
|
|
|
|
#
|
|
|
|
##################################################################
|
|
|
|
|
|
|
|
# Information about the host that 'configure' was run on.
|
2000-10-13 00:26:21 +00:00
|
|
|
host = @host@
|
|
|
|
host_alias = @host_alias@
|
|
|
|
host_cpu = @host_cpu@
|
|
|
|
host_vendor = @host_vendor@
|
|
|
|
host_os = @host_os@
|
2002-05-07 03:10:28 +00:00
|
|
|
# Our platform canonical name (as determined by configure)
|
|
|
|
# this is a #define value (i.e. U_XXXX or XXXX)
|
|
|
|
platform = @platform@
|
1999-10-13 06:17:37 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *4* compiler flags and misc. options
|
|
|
|
#
|
|
|
|
##################################################################
|
|
|
|
AR = @AR@
|
2005-05-27 23:49:32 +00:00
|
|
|
# initial tab keeps it out of the shell version.
|
|
|
|
ARFLAGS := @ARFLAGS@ $(ARFLAGS)
|
|
|
|
#SH#ARFLAGS="@ARFLAGS@ ${ARFLAGS}"
|
2002-05-07 03:10:28 +00:00
|
|
|
CC = @CC@
|
|
|
|
CFLAGS = @CFLAGS@
|
2000-10-13 00:26:21 +00:00
|
|
|
CPP = @CPP@
|
2002-05-07 03:10:28 +00:00
|
|
|
CPPFLAGS = @CPPFLAGS@ $(LIBCPPFLAGS) -I$(prefix)/include
|
|
|
|
CXX = @CXX@
|
|
|
|
CXXFLAGS = @CXXFLAGS@
|
|
|
|
DEFAULT_MODE = @DATA_PACKAGING_MODE@
|
|
|
|
DEFS = @DEFS@
|
|
|
|
FFLAGS = @FFLAGS@
|
2007-09-20 16:19:52 +00:00
|
|
|
# use a consistent INSTALL
|
|
|
|
INSTALL = $(SHELL) $(pkgdatadir)/install-sh -c
|
2002-05-07 03:10:28 +00:00
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
|
|
LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
|
|
|
|
LIBS = @LIBS@
|
|
|
|
LIB_M = @LIB_M@
|
|
|
|
LIB_VERSION = @LIB_VERSION@
|
|
|
|
LIB_VERSION_MAJOR = @LIB_VERSION_MAJOR@
|
|
|
|
MKINSTALLDIRS = $(SHELL) $(pkgdatadir)/mkinstalldirs
|
|
|
|
RANLIB = @RANLIB@
|
|
|
|
RMV = rm -rf
|
|
|
|
SHELL = @SHELL@
|
|
|
|
SHLIB.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared
|
|
|
|
SHLIB.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -shared
|
2000-10-13 00:26:21 +00:00
|
|
|
U_IS_BIG_ENDIAN = @U_IS_BIG_ENDIAN@
|
2002-05-07 03:10:28 +00:00
|
|
|
includedir = @includedir@
|
|
|
|
infodir = @infodir@
|
|
|
|
localstatedir = @localstatedir@
|
|
|
|
mandir = @mandir@
|
|
|
|
oldincludedir = @oldincludedir@
|
|
|
|
program_transform_name = @program_transform_name@
|
|
|
|
sharedstatedir = @sharedstatedir@
|
|
|
|
sysconfdir = @sysconfdir@
|
|
|
|
INSTALL-L = ${INSTALL_DATA}
|
1999-10-13 06:17:37 +00:00
|
|
|
|
2000-06-29 02:34:31 +00:00
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *5* packaging options and directories
|
|
|
|
#
|
|
|
|
##################################################################
|
2000-06-29 02:34:31 +00:00
|
|
|
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
# The basename of the ICU data file (i.e. icudt21b )
|
2004-12-04 22:57:38 +00:00
|
|
|
ICUDATA_CHAR = @ICUDATA_CHAR@
|
2000-11-30 19:06:50 +00:00
|
|
|
ICUDATA_NAME = icudt@LIB_VERSION_MAJOR@@ICUDATA_CHAR@
|
2002-05-07 03:10:28 +00:00
|
|
|
|
|
|
|
# Defaults for pkgdata's mode and directories
|
|
|
|
# The default data dir changes depending on what packaging mode
|
|
|
|
# is being used
|
2000-11-30 19:06:50 +00:00
|
|
|
ifeq ($(strip $(PKGDATA_MODE)),)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# if [ "x$PKGDATA_MODE" = "x" ];
|
|
|
|
#SH# then
|
2000-11-30 19:06:50 +00:00
|
|
|
PKGDATA_MODE=@DATA_PACKAGING_MODE@
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# fi
|
2000-11-30 19:06:50 +00:00
|
|
|
endif
|
2004-02-20 01:11:44 +00:00
|
|
|
|
|
|
|
#SH# case "$PKGDATA_MODE" in
|
2000-11-30 19:06:50 +00:00
|
|
|
ifeq ($(PKGDATA_MODE),common)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# common)
|
2001-11-10 01:54:17 +00:00
|
|
|
ICUDATA_DIR = $(pkgdatadir)
|
2001-11-14 00:16:54 +00:00
|
|
|
ICUPKGDATA_DIR = $(ICUDATA_DIR)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# ;;
|
2000-11-30 19:06:50 +00:00
|
|
|
else
|
2001-11-10 01:54:17 +00:00
|
|
|
ifeq ($(PKGDATA_MODE),dll)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# dll)
|
2001-11-10 01:54:17 +00:00
|
|
|
ICUDATA_DIR = $(pkgdatadir)
|
|
|
|
ICUPKGDATA_DIR = $(libdir)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# ;;
|
2001-11-10 01:54:17 +00:00
|
|
|
else
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# *)
|
|
|
|
ICUDATA_DIR = $(pkgdatadir)
|
2001-11-14 00:16:54 +00:00
|
|
|
ICUPKGDATA_DIR = $(ICUDATA_DIR)
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# ;;
|
2001-11-10 01:54:17 +00:00
|
|
|
endif
|
2000-11-30 19:06:50 +00:00
|
|
|
endif
|
2001-09-21 04:29:04 +00:00
|
|
|
|
2004-02-20 01:11:44 +00:00
|
|
|
#SH# esac
|
2002-05-07 03:10:28 +00:00
|
|
|
|
2004-03-02 00:38:39 +00:00
|
|
|
GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
|
|
|
|
|
2002-05-07 03:10:28 +00:00
|
|
|
##################################################################
|
|
|
|
##################################################################
|
|
|
|
#
|
|
|
|
# *6* Inclusion of platform make fragment (mh-* file)
|
|
|
|
#
|
|
|
|
##################################################################
|
|
|
|
# The mh- file ("make fragment") for the platform is included here.
|
|
|
|
# It may override the above settings.
|
|
|
|
# It is put last so that the mh-file can override anything.
|
2008-10-10 16:52:15 +00:00
|
|
|
# The selfcheck is just a sanity check that this makefile is
|
|
|
|
# parseable. The mh fragment is only included if this does not occur.
|
2002-05-07 03:10:28 +00:00
|
|
|
|
2008-10-10 16:52:15 +00:00
|
|
|
ifeq (selfcheck,$(MAKECMDGOALS)) #M#
|
|
|
|
selfcheck: #M#
|
|
|
|
@echo passed #M#
|
|
|
|
else #M#
|
2002-05-07 03:10:28 +00:00
|
|
|
include $(pkgdatadir)/config/@platform_make_fragment_name@
|
2008-10-10 16:52:15 +00:00
|
|
|
endif #M#
|
2002-05-07 03:10:28 +00:00
|
|
|
|