]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/icudefs.mk.in
ICU-491.11.2.tar.gz
[apple/icu.git] / icuSources / icudefs.mk.in
index 4167822f34166205e01657efb251e55476c9c510..699031ecfd193a566259173be09f211156fb3964 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Yves Arrouye.
 #
-# Copyright (C) 2000-2008, International Business Machines Corporation and others.
+# Copyright (C) 2000-2012, International Business Machines Corporation and others.
 # All Rights Reserved.
 
 #
@@ -28,9 +28,14 @@ libdir = @libdir@
 includedir = @includedir@
 mandir = @mandir@
 sysconfdir = @sysconfdir@
+# controls the include of $(top_builddir)/icucross.mk at bottom of file
+cross_compiling = @cross_compiling@
+cross_buildroot = @cross_buildroot@
 
 # Package information
 
+PACKAGE_ICU_DESCRIPTION = "International Components for Unicode"
+PACKAGE_ICU_URL = "http://icu-project.org"
 PACKAGE = @PACKAGE@
 VERSION = @VERSION@
 UNICODE_VERSION = @UNICODE_VERSION@
@@ -45,7 +50,8 @@ SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
 ICUDATA_DIR = @pkgicudatadir@/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION)
 
 ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@
-ICUDATA_ENTRY_POINT = $(ICUDATA_BASENAME_VERSION)
+# the entry point is almost like the basename, but has the lib suffix.  
+ICUDATA_ENTRY_POINT = $(ICUPREFIX)dt@ICULIBSUFFIXCNAME@@LIB_VERSION_MAJOR@ 
 ICUDATA_CHAR = @ICUDATA_CHAR@
 ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)$(ICUDATA_CHAR)
 PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
@@ -61,10 +67,16 @@ ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
 PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
 ICUPKGDATA_DIR = $(libdir)
 else
+ifeq ($(PKGDATA_MODE),static)
+ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
+PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
+ICUPKGDATA_DIR = $(libdir)
+else
 ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
 ICUPKGDATA_DIR = $(ICUDATA_DIR)
 endif
 endif
+endif
 # This is needed so that make -j2 doesn't complain when invoking pkgdata's make
 PKGDATA_INVOKE_OPTS = MAKEFLAGS=
 
@@ -105,13 +117,15 @@ AR = @AR@
 ARFLAGS = @ARFLAGS@ r
 RANLIB = @RANLIB@
 COMPILE_LINK_ENVVAR = @COMPILE_LINK_ENVVAR@
+UCLN_NO_AUTO_CLEANUP = @UCLN_NO_AUTO_CLEANUP@
 
 # Various flags for the tools
 
 # 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 =
+# U_ATTRIBUTE_DEPRECATED is defined to hide warnings about deprecated API warnings.
+DEFS = -DU_ATTRIBUTE_DEPRECATED=
 # CFLAGS is for C only flags
 CFLAGS = @CFLAGS@
 # CXXFLAGS is for C++ only flags
@@ -145,8 +159,8 @@ ENABLE_SHARED = @ENABLE_SHARED@
 
 # Echo w/o newline
 
-#ECHO_N = @ECHO_N@
-#ECHO_C = @ECHO_C@
+#ECHO_N = @ICU_ECHO_N@
+#ECHO_C = @ICU_ECHO_C@
 
 # Commands to compile
 COMPILE.c=    $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
@@ -157,8 +171,8 @@ LINK.c=       $(CC) $(CFLAGS) $(LDFLAGS)
 LINK.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS)
 
 # Commands to make a shared library
-SHLIB.c=      $(CC) $(CFLAGS) $(LDFLAGS) -shared
-SHLIB.cc=     $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
+SHLIB.c=      $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
+SHLIB.cc=     $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS)
 
 # Environment variable to set a runtime search path
 LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
@@ -203,10 +217,9 @@ 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)
+# overridden by icucross.mk
+TOOLBINDIR=$(BINDIR)
+TOOLLIBDIR=$(LIBDIR)
 
 # Name flexibility for the library naming scheme.  Any modifications should
 # be made in the mh- file for the specific platform.
@@ -219,25 +232,57 @@ IO_STUBNAME = io
 TOOLUTIL_STUBNAME = tu
 CTESTFW_STUBNAME = test
 
+# Just the libs.
+ICULIBS_DT     = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_UC     = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_I18N   = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_LE     = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_LX     = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_IO     = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_CTESTFW        = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
 # Link commands to link to ICU libs
-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)
+LLIBDIR                = -L$(LIBDIR)
+LSTUBDIR       = -L$(top_builddir)/stubdata
+LCTESTFW       = -L$(top_builddir)/tools/ctestfw
+
+LIBICUDT       = $(LLIBDIR) $(LSTUBDIR) $(ICULIBS_DT)
+LIBICUUC       = $(LLIBDIR) $(ICULIBS_UC) $(LSTUBDIR) $(ICULIBS_DT)
+LIBICUI18N     = $(LLIBDIR) $(ICULIBS_I18N)
+LIBICULE       = $(LLIBDIR) $(ICULIBS_LE)
+LIBICULX       = $(LLIBDIR) $(ICULIBS_LX)
+LIBCTESTFW     = $(LCTESTFW) $(ICULIBS_CTESTFW)
+LIBICUTOOLUTIL = $(LLIBDIR) $(ICULIBS_TOOLUTIL)
+LIBICUIO       = $(LLIBDIR) $(ICULIBS_IO)
 
 # Invoke, set library path for all ICU libraries.
+# overridden by icucross.mk
 INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER)
+# prefer stubdata
+PKGDATA_INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$(LIBRARY_PATH_PREFIX)$(LIBDIR):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER) $(PKGDATA_INVOKE_OPTS)
+INSTALLED_INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR)
 
 # Platform-specific setup
 include @platform_make_fragment@
 
+# Current full path directory.
+CURR_FULL_DIR=$(shell pwd | sed 's/ /\\ /g')
+# Current full path directory for use in source code in a -D compiler option.
+CURR_SRCCODE_FULL_DIR=$(shell pwd | sed 's/ /\\ /')
+
 # 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
 
+# some imported things from the cross env
+TOOLEXEEXT = $(EXEEXT)
+ifneq ($(strip $(cross_buildroot)),)
+include $(cross_buildroot)/config/icucross.mk
+else
+cross_buildroot = $(top_builddir)
+endif
+
+# optional include at top
+-include $(top_builddir)/icudefs.local