Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | # Make definitions that are shared by the different subprojects of ICU. |
michael@0 | 2 | # |
michael@0 | 3 | # Yves Arrouye. |
michael@0 | 4 | # |
michael@0 | 5 | # Copyright (C) 2000-2013, International Business Machines Corporation and others. |
michael@0 | 6 | # All Rights Reserved. |
michael@0 | 7 | |
michael@0 | 8 | # |
michael@0 | 9 | # Some of these variables are overridden in the config/mh-* files. |
michael@0 | 10 | # |
michael@0 | 11 | # Please be sure to update config/Makefile.inc.in if you add something here. |
michael@0 | 12 | # |
michael@0 | 13 | |
michael@0 | 14 | # Shell to use |
michael@0 | 15 | |
michael@0 | 16 | SHELL = @SHELL@ |
michael@0 | 17 | |
michael@0 | 18 | # Standard directories |
michael@0 | 19 | |
michael@0 | 20 | prefix = @prefix@ |
michael@0 | 21 | exec_prefix = @exec_prefix@ |
michael@0 | 22 | |
michael@0 | 23 | bindir = @bindir@ |
michael@0 | 24 | sbindir = @sbindir@ |
michael@0 | 25 | datarootdir = @datarootdir@ |
michael@0 | 26 | datadir = @datadir@ |
michael@0 | 27 | libdir = @libdir@ |
michael@0 | 28 | includedir = @includedir@ |
michael@0 | 29 | mandir = @mandir@ |
michael@0 | 30 | sysconfdir = @sysconfdir@ |
michael@0 | 31 | # controls the include of $(top_builddir)/icucross.mk at bottom of file |
michael@0 | 32 | cross_compiling = @cross_compiling@ |
michael@0 | 33 | cross_buildroot = @cross_buildroot@ |
michael@0 | 34 | |
michael@0 | 35 | # Package information |
michael@0 | 36 | |
michael@0 | 37 | PACKAGE_ICU_DESCRIPTION = "International Components for Unicode" |
michael@0 | 38 | PACKAGE_ICU_URL = "http://icu-project.org" |
michael@0 | 39 | PACKAGE = @PACKAGE@ |
michael@0 | 40 | VERSION = @VERSION@ |
michael@0 | 41 | UNICODE_VERSION = @UNICODE_VERSION@ |
michael@0 | 42 | SO_TARGET_VERSION = @LIB_VERSION@ |
michael@0 | 43 | SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@ |
michael@0 | 44 | |
michael@0 | 45 | # The ICU data external name is usually icudata; the entry point name is |
michael@0 | 46 | # the version-dependent name (for no particular reason except it was easier |
michael@0 | 47 | # to change the build this way). When building in common mode, the data |
michael@0 | 48 | # name is the versioned platform-dependent one. |
michael@0 | 49 | |
michael@0 | 50 | ICUDATA_DIR = @pkgicudatadir@/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION) |
michael@0 | 51 | |
michael@0 | 52 | ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@ |
michael@0 | 53 | # the entry point is almost like the basename, but has the lib suffix. |
michael@0 | 54 | ICUDATA_ENTRY_POINT = $(ICUPREFIX)dt@ICULIBSUFFIXCNAME@@LIB_VERSION_MAJOR@ |
michael@0 | 55 | ICUDATA_CHAR = @ICUDATA_CHAR@ |
michael@0 | 56 | ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)$(ICUDATA_CHAR) |
michael@0 | 57 | PKGDATA_LIBSTATICNAME = -L $(STATIC_PREFIX)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) |
michael@0 | 58 | ifeq ($(strip $(PKGDATA_MODE)),) |
michael@0 | 59 | PKGDATA_MODE=@DATA_PACKAGING_MODE@ |
michael@0 | 60 | endif |
michael@0 | 61 | ifeq ($(PKGDATA_MODE),common) |
michael@0 | 62 | ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME) |
michael@0 | 63 | ICUPKGDATA_DIR = $(ICUDATA_DIR) |
michael@0 | 64 | else |
michael@0 | 65 | ifeq ($(PKGDATA_MODE),dll) |
michael@0 | 66 | ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME) |
michael@0 | 67 | PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) |
michael@0 | 68 | ICUPKGDATA_DIR = $(libdir) |
michael@0 | 69 | else |
michael@0 | 70 | ifeq ($(PKGDATA_MODE),static) |
michael@0 | 71 | ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME) |
michael@0 | 72 | PKGDATA_LIBNAME = -L $(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX) |
michael@0 | 73 | ICUPKGDATA_DIR = $(libdir) |
michael@0 | 74 | else |
michael@0 | 75 | ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME) |
michael@0 | 76 | ICUPKGDATA_DIR = $(ICUDATA_DIR) |
michael@0 | 77 | endif |
michael@0 | 78 | endif |
michael@0 | 79 | endif |
michael@0 | 80 | |
michael@0 | 81 | # These are defined here because mh-cygwin-msvc needs to override these values. |
michael@0 | 82 | ICUPKGDATA_INSTALL_DIR = $(DESTDIR)$(ICUPKGDATA_DIR) |
michael@0 | 83 | ICUPKGDATA_INSTALL_LIBDIR = $(DESTDIR)$(libdir) |
michael@0 | 84 | |
michael@0 | 85 | # If defined to a valid value, pkgdata will generate a data library more quickly |
michael@0 | 86 | GENCCODE_ASSEMBLY = @GENCCODE_ASSEMBLY@ |
michael@0 | 87 | |
michael@0 | 88 | # ICU specific directories |
michael@0 | 89 | |
michael@0 | 90 | pkgdatadir = $(datadir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION) |
michael@0 | 91 | pkglibdir = $(libdir)/$(PACKAGE)$(ICULIBSUFFIX)/$(VERSION) |
michael@0 | 92 | pkgsysconfdir = $(sysconfdir)/$(PACKAGE)$(ICULIBSUFFIX) |
michael@0 | 93 | |
michael@0 | 94 | # Installation programs |
michael@0 | 95 | |
michael@0 | 96 | MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs |
michael@0 | 97 | |
michael@0 | 98 | INSTALL = @INSTALL@ |
michael@0 | 99 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
michael@0 | 100 | INSTALL_DATA = @INSTALL_DATA@ |
michael@0 | 101 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
michael@0 | 102 | |
michael@0 | 103 | # Library suffix (to support different C++ compilers) |
michael@0 | 104 | |
michael@0 | 105 | ICULIBSUFFIX=@ICULIBSUFFIX@ |
michael@0 | 106 | |
michael@0 | 107 | # Compiler and tools |
michael@0 | 108 | |
michael@0 | 109 | ENABLE_DEBUG = @ENABLE_DEBUG@ |
michael@0 | 110 | ENABLE_RELEASE = @ENABLE_RELEASE@ |
michael@0 | 111 | EXEEXT = @EXEEXT@ |
michael@0 | 112 | CC = @CC@ |
michael@0 | 113 | CXX = @CXX@ |
michael@0 | 114 | AR = @AR@ |
michael@0 | 115 | ARFLAGS = @ARFLAGS@ r |
michael@0 | 116 | RANLIB = @RANLIB@ |
michael@0 | 117 | COMPILE_LINK_ENVVAR = @COMPILE_LINK_ENVVAR@ |
michael@0 | 118 | UCLN_NO_AUTO_CLEANUP = @UCLN_NO_AUTO_CLEANUP@ |
michael@0 | 119 | |
michael@0 | 120 | # Various flags for the tools |
michael@0 | 121 | |
michael@0 | 122 | # DEFS is for common macro definitions. |
michael@0 | 123 | # configure prevents user defined DEFS, and configure's DEFS is not needed |
michael@0 | 124 | # So we ignore the DEFS that comes from configure |
michael@0 | 125 | # U_ATTRIBUTE_DEPRECATED is defined to hide warnings about deprecated API warnings. |
michael@0 | 126 | DEFS = -DU_ATTRIBUTE_DEPRECATED= |
michael@0 | 127 | # CFLAGS is for C only flags |
michael@0 | 128 | CFLAGS = @CFLAGS@ |
michael@0 | 129 | # CXXFLAGS is for C++ only flags |
michael@0 | 130 | CXXFLAGS = @CXXFLAGS@ |
michael@0 | 131 | # CPPFLAGS is for C Pre-Processor flags |
michael@0 | 132 | CPPFLAGS = @CPPFLAGS@ |
michael@0 | 133 | # LIBCFLAGS are the flags for static and shared libraries. |
michael@0 | 134 | LIBCFLAGS = @LIBCFLAGS@ |
michael@0 | 135 | # LIBCXXFLAGS are the flags for static and shared libraries. |
michael@0 | 136 | LIBCXXFLAGS = @LIBCXXFLAGS@ |
michael@0 | 137 | # DEFAULT_LIBS are the default libraries to link against |
michael@0 | 138 | DEFAULT_LIBS = @LIBS@ |
michael@0 | 139 | # LIB_M is for linking against the math library |
michael@0 | 140 | LIB_M = @LIB_M@ |
michael@0 | 141 | # LIB_THREAD is for linking against the threading library |
michael@0 | 142 | LIB_THREAD = @LIB_THREAD@ |
michael@0 | 143 | # OUTOPT is for creating a specific output name |
michael@0 | 144 | OUTOPT = -o # The extra space after the argument is needed. |
michael@0 | 145 | # AR_OUTOPT is for creating a specific output name for static libraries. |
michael@0 | 146 | AR_OUTOPT = |
michael@0 | 147 | |
michael@0 | 148 | ENABLE_RPATH = @ENABLE_RPATH@ |
michael@0 | 149 | ifeq ($(ENABLE_RPATH),YES) |
michael@0 | 150 | RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir) |
michael@0 | 151 | endif |
michael@0 | 152 | LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS) |
michael@0 | 153 | |
michael@0 | 154 | # What kind of libraries are we building and linking against? |
michael@0 | 155 | ENABLE_STATIC = @ENABLE_STATIC@ |
michael@0 | 156 | ENABLE_SHARED = @ENABLE_SHARED@ |
michael@0 | 157 | |
michael@0 | 158 | # Echo w/o newline |
michael@0 | 159 | |
michael@0 | 160 | #ECHO_N = @ICU_ECHO_N@ |
michael@0 | 161 | #ECHO_C = @ICU_ECHO_C@ |
michael@0 | 162 | |
michael@0 | 163 | # Commands to compile |
michael@0 | 164 | COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c |
michael@0 | 165 | COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c |
michael@0 | 166 | |
michael@0 | 167 | # Commands to link |
michael@0 | 168 | LINK.c= $(CC) $(CFLAGS) $(LDFLAGS) |
michael@0 | 169 | LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) |
michael@0 | 170 | |
michael@0 | 171 | # Commands to make a shared library |
michael@0 | 172 | SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) |
michael@0 | 173 | SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) |
michael@0 | 174 | |
michael@0 | 175 | # ICU_MSG |
michael@0 | 176 | ICU_MSG=@echo " $(1) " |
michael@0 | 177 | |
michael@0 | 178 | # Do not show the large compiling arguments by default. |
michael@0 | 179 | # To use: |
michael@0 | 180 | # change |
michael@0 | 181 | # $(CC) -o foo |
michael@0 | 182 | # to |
michael@0 | 183 | # $(call SILENT_COMPILE,$(CC) -o foo) |
michael@0 | 184 | ifndef VERBOSE |
michael@0 | 185 | SILENT_COMPILE=$(call ICU_MSG,$(notdir $(firstword $(1)))) "... " $< && $(1) || \ |
michael@0 | 186 | ( echo "*** Failed compilation command follows: ----------------------------------------------------------" ; \ |
michael@0 | 187 | echo "$(1)" ; \ |
michael@0 | 188 | echo "--- ( rebuild with \"$(MAKE) VERBOSE=1 $(MAKECMDGOALS)\" to show all parameters ) --------" ; \ |
michael@0 | 189 | false ) |
michael@0 | 190 | else |
michael@0 | 191 | SILENT_COMPILE=$(1) |
michael@0 | 192 | endif |
michael@0 | 193 | |
michael@0 | 194 | # Environment variable to set a runtime search path |
michael@0 | 195 | LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH |
michael@0 | 196 | |
michael@0 | 197 | # Versioned target for a shared library. |
michael@0 | 198 | FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION) |
michael@0 | 199 | MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR) |
michael@0 | 200 | SHARED_OBJECT = $(FINAL_SO_TARGET) |
michael@0 | 201 | |
michael@0 | 202 | ## How ICU libraries are named... ex. $(LIBICU)uc$(SO) |
michael@0 | 203 | # Prefix for the ICU library names |
michael@0 | 204 | ICUPREFIX = icu |
michael@0 | 205 | LIBPREFIX = lib |
michael@0 | 206 | LIBICU = $(LIBPREFIX)$(ICUPREFIX) |
michael@0 | 207 | |
michael@0 | 208 | ## If we can't use the shared libraries, use the static libraries |
michael@0 | 209 | ifneq ($(ENABLE_SHARED),YES) |
michael@0 | 210 | STATIC_PREFIX_WHEN_USED = s |
michael@0 | 211 | else |
michael@0 | 212 | STATIC_PREFIX_WHEN_USED = |
michael@0 | 213 | endif |
michael@0 | 214 | |
michael@0 | 215 | # Static library prefix and file extension |
michael@0 | 216 | STATIC_PREFIX = s |
michael@0 | 217 | LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) |
michael@0 | 218 | A = a |
michael@0 | 219 | SOBJ = $(SO) |
michael@0 | 220 | |
michael@0 | 221 | # Force removal [for make clean] |
michael@0 | 222 | RMV = rm -rf |
michael@0 | 223 | |
michael@0 | 224 | # Platform commands to remove or move executable and library targets |
michael@0 | 225 | # INSTALL-L installs libraries. Override in mh-* file to INSTALL_PROGRAM |
michael@0 | 226 | # when the library needs to have executable permissions |
michael@0 | 227 | INSTALL-S = $(INSTALL_PROGRAM) |
michael@0 | 228 | INSTALL-L = $(INSTALL_PROGRAM) |
michael@0 | 229 | #INSTALL-L = $(INSTALL_DATA) |
michael@0 | 230 | |
michael@0 | 231 | # Location of the libraries before "make install" is used |
michael@0 | 232 | LIBDIR=$(top_builddir)/lib |
michael@0 | 233 | |
michael@0 | 234 | # Location of the executables before "make install" is used |
michael@0 | 235 | BINDIR=$(top_builddir)/bin |
michael@0 | 236 | |
michael@0 | 237 | # overridden by icucross.mk |
michael@0 | 238 | TOOLBINDIR=$(BINDIR) |
michael@0 | 239 | TOOLLIBDIR=$(LIBDIR) |
michael@0 | 240 | |
michael@0 | 241 | # Name flexibility for the library naming scheme. Any modifications should |
michael@0 | 242 | # be made in the mh- file for the specific platform. |
michael@0 | 243 | DATA_STUBNAME = data |
michael@0 | 244 | COMMON_STUBNAME = uc |
michael@0 | 245 | I18N_STUBNAME = i18n |
michael@0 | 246 | LAYOUT_STUBNAME = le |
michael@0 | 247 | LAYOUTEX_STUBNAME = lx |
michael@0 | 248 | IO_STUBNAME = io |
michael@0 | 249 | TOOLUTIL_STUBNAME = tu |
michael@0 | 250 | CTESTFW_STUBNAME = test |
michael@0 | 251 | |
michael@0 | 252 | # Just the libs. |
michael@0 | 253 | ICULIBS_DT = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 254 | ICULIBS_UC = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 255 | ICULIBS_I18N = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 256 | ICULIBS_LE = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 257 | ICULIBS_LX = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 258 | ICULIBS_IO = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 259 | ICULIBS_CTESTFW = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 260 | ICULIBS_TOOLUTIL = -l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX) |
michael@0 | 261 | # Link commands to link to ICU libs |
michael@0 | 262 | LLIBDIR = -L$(LIBDIR) |
michael@0 | 263 | LSTUBDIR = -L$(top_builddir)/stubdata |
michael@0 | 264 | LCTESTFW = -L$(top_builddir)/tools/ctestfw |
michael@0 | 265 | |
michael@0 | 266 | LIBICUDT = $(LLIBDIR) $(LSTUBDIR) $(ICULIBS_DT) |
michael@0 | 267 | LIBICUUC = $(LLIBDIR) $(ICULIBS_UC) $(LSTUBDIR) $(ICULIBS_DT) |
michael@0 | 268 | LIBICUI18N = $(LLIBDIR) $(ICULIBS_I18N) |
michael@0 | 269 | LIBICULE = $(LLIBDIR) $(ICULIBS_LE) |
michael@0 | 270 | LIBICULX = $(LLIBDIR) $(ICULIBS_LX) |
michael@0 | 271 | LIBCTESTFW = $(LCTESTFW) $(ICULIBS_CTESTFW) |
michael@0 | 272 | LIBICUTOOLUTIL = $(LLIBDIR) $(ICULIBS_TOOLUTIL) |
michael@0 | 273 | LIBICUIO = $(LLIBDIR) $(ICULIBS_IO) |
michael@0 | 274 | |
michael@0 | 275 | # Invoke, set library path for all ICU libraries. |
michael@0 | 276 | # overridden by icucross.mk |
michael@0 | 277 | INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)$(LIBDIR):$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER) |
michael@0 | 278 | # prefer stubdata |
michael@0 | 279 | PKGDATA_INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/stubdata:$(top_builddir)/tools/ctestfw:$(LIBRARY_PATH_PREFIX)$(LIBDIR):$$$(LDLIBRARYPATH_ENVVAR) $(LEAK_CHECKER) |
michael@0 | 280 | INSTALLED_INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR) |
michael@0 | 281 | |
michael@0 | 282 | # Current full path directory for cross compilation |
michael@0 | 283 | ifneq ($(strip $(cross_buildroot)),) |
michael@0 | 284 | include $(cross_buildroot)/config/icucross.inc |
michael@0 | 285 | endif |
michael@0 | 286 | |
michael@0 | 287 | # Platform-specific setup |
michael@0 | 288 | include @platform_make_fragment@ |
michael@0 | 289 | |
michael@0 | 290 | # Current full path directory. |
michael@0 | 291 | CURR_FULL_DIR?=$(shell pwd | sed 's/ /\\ /g') |
michael@0 | 292 | # Current full path directory for use in source code in a -D compiler option. |
michael@0 | 293 | CURR_SRCCODE_FULL_DIR?=$(shell pwd | sed 's/ /\\ /') |
michael@0 | 294 | |
michael@0 | 295 | # When shared libraries are disabled and static libraries are enabled, |
michael@0 | 296 | # the C++ compiler must be used to link in the libraries for the tools. |
michael@0 | 297 | ifneq ($(ENABLE_SHARED),YES) |
michael@0 | 298 | LINK.c = $(LINK.cc) |
michael@0 | 299 | endif |
michael@0 | 300 | |
michael@0 | 301 | # some imported things from the cross env |
michael@0 | 302 | TOOLEXEEXT = $(EXEEXT) |
michael@0 | 303 | ifneq ($(strip $(cross_buildroot)),) |
michael@0 | 304 | include $(cross_buildroot)/config/icucross.mk |
michael@0 | 305 | else |
michael@0 | 306 | cross_buildroot = $(top_builddir) |
michael@0 | 307 | endif |
michael@0 | 308 | |
michael@0 | 309 | # for tests |
michael@0 | 310 | ifneq ($(TEST_STATUS_FILE),) |
michael@0 | 311 | TEST_OUTPUT_OPTS="-E$(TEST_STATUS_FILE)" |
michael@0 | 312 | endif |
michael@0 | 313 | |
michael@0 | 314 | # optional include at top |
michael@0 | 315 | -include $(top_builddir)/icudefs.local |