#
# Yves Arrouye.
#
-# Copyright (C) 2000-2003, International Business Machines Corporation and others.
+# Copyright (C) 2000-2004, International Business Machines Corporation and others.
# All Rights Reserved.
#
SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
# The ICU data external name is usually icudata; the entry point name is
-# the version-dependent name (for no particula reason except it was easier
+# the version-dependent name (for no particular reason except it was easier
# to change the build this way). When building in common mode, the data
# name is the versioned platform-dependent one.
ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@
ICUDATA_ENTRY_POINT = $(ICUDATA_BASENAME_VERSION)
ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)@ICUDATA_CHAR@
+PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
ifeq ($(strip $(PKGDATA_MODE)),)
PKGDATA_MODE=@DATA_PACKAGING_MODE@
endif
ICUPKGDATA_DIR = $(ICUDATA_DIR)
else
ifeq ($(PKGDATA_MODE),dll)
-ICUDATA_NAME = $(ICUPREFIX)data$(ICULIBSUFFIX)
+ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
+PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
ICUPKGDATA_DIR = $(libdir)
else
-ICUDATA_NAME = $(ICUPREFIX)data
+ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
ICUPKGDATA_DIR = $(ICUDATA_DIR)
endif
endif
+# These are defined here because mh-cygwin-msvc needs to override these values.
+ICUPKGDATA_INSTALL_DIR = $(DESTDIR)$(ICUPKGDATA_DIR)
+ICUPKGDATA_INSTALL_LIBDIR = $(DESTDIR)$(libdir)
+
+# If defined to a valid value, pkgdata will generate a data library more quickly
+GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@
+
# ICU specific directories
pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
# Compiler and tools
+ENABLE_DEBUG = @ENABLE_DEBUG@
+ENABLE_RELEASE = @ENABLE_RELEASE@
EXEEXT = @EXEEXT@
CC = @CC@
CXX = @CXX@
# Various flags for the tools
-# DEFS is for common macro definitions
-DEFS = @DEFS@
+# 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 =
# CFLAGS is for C only flags
CFLAGS = @CFLAGS@
# CXXFLAGS is for C++ only flags
# Echo w/o newline
-ECHO_N = @ECHO_N@
-ECHO_C = @ECHO_C@
+#ECHO_N = @ECHO_N@
+#ECHO_C = @ECHO_C@
# Commands to compile
COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
## How ICU libraries are named... ex. $(LIBICU)uc$(SO)
# Prefix for the ICU library names
ICUPREFIX = icu
-LIBICU = lib$(ICUPREFIX)
+LIBPREFIX = lib
+LIBICU = $(LIBPREFIX)$(ICUPREFIX)
+
+## If we can't use the shared libraries, use the static libraries
+ifneq ($(ENABLE_SHARED),YES)
+STATIC_PREFIX_WHEN_USED = s
+else
+STATIC_PREFIX_WHEN_USED =
+endif
+
+# Static library prefix and file extension
+STATIC_PREFIX = s
+LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+A = a
# Force removal [for make clean]
RMV = rm -rf
+
# Platform commands to remove or move executable and library targets
+# INSTALL-L installs libraries. Override in mh-* file to INSTALL_PROGRAM
+# when the library needs to have executable permissions
INSTALL-S = $(INSTALL_PROGRAM)
INSTALL-L = $(INSTALL_DATA)
+# 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
+
+# Current full path directory.
+CURR_FULL_DIR=$(shell pwd)
+# Current full path directory for use in source code in a -D compiler option.
+CURR_SRCCODE_FULL_DIR=$(shell pwd)
+
+# 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
+
# Link commands to link to ICU libs
-LIBICUDT= -L$(top_builddir)/data/out -L$(top_builddir)/stubdata -l$(ICUPREFIX)data$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBICUUC= -L$(top_builddir)/common -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) $(LIBICUDT)
-LIBICUI18N= -L$(top_builddir)/i18n -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBICULE= -L$(top_builddir)/layout -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBICULX= -L$(top_builddir)/layoutex -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBCTESTFW= -L$(top_builddir)/tools/ctestfw -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBICUTOOLUTIL= -L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-LIBUSTDIO= -L$(top_builddir)/extra/ustdio -licuio$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+LIBICUDT= -L$(LIBDIR) -L$(top_builddir)/stubdata -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+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)
# Invoke, set library path for all ICU libraries.
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$(top_builddir)/layout:$(top_builddir)/layoutex:$(top_builddir)/extra/ustdio:$(top_builddir)/tools/ctestfw:$(top_builddir)/data/out:$(top_builddir)/data:$(top_builddir)/stubdata/:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
# Platform-specific setup
include @platform_make_fragment@
+# 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
+