toolkit/library/libxul.mk

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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.

     1 # This Source Code Form is subject to the terms of the Mozilla Public
     2 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3 # You can obtain one at http://mozilla.org/MPL/2.0/.
     5 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
     6 # This is going to be a framework named "XUL", not an ordinary library named
     7 # "libxul.dylib"
     8 SHARED_LIBRARY_NAME=XUL
     9 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
    10 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
    11 # as-is so that dependencies of the form -ltracemalloc still work.
    12 MAKE_FRAMEWORK=1
    13 else
    14 SHARED_LIBRARY_NAME=xul
    15 endif
    17 SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,xul,$(DEPTH)/toolkit/library)
    19 EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
    21 # dependent libraries
    22 ifdef MOZ_B2G_BT_BLUEZ #{
    23 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
    24 OS_LIBS += -ldbus
    25 endif
    26 endif #}
    28 ifdef MOZ_B2G_CAMERA #{
    29 OS_LIBS += -lstagefright -lstagefright_omx
    30 endif #}
    32 ifeq (Linux,$(OS_ARCH))
    33 ifneq (Android,$(OS_TARGET))
    34 OS_LIBS += -lrt
    35 EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
    37 symverscript: $(topsrcdir)/toolkit/library/symverscript.in
    38 	$(call py_action,preprocessor, \
    39 		-DVERSION='$(SHARED_LIBRARY_NAME)$(MOZILLA_SYMBOLVERSION)' $< -o $@)
    41 EXTRA_DEPS += symverscript
    42 endif
    43 endif
    45 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
    46 OS_LIBS += -lcups
    47 endif
    49 EXTRA_DSO_LDOPTS += \
    50   $(LIBS_DIR) \
    51   $(MOZ_JS_LIBS) \
    52   $(NSS_LIBS) \
    53   $(MOZ_CAIRO_OSLIBS) \
    54   $(MOZ_APP_EXTRA_LIBS) \
    55   $(SQLITE_LIBS) \
    56   $(NULL)
    58 ifdef ENABLE_INTL_API
    59 ifdef JS_SHARED_LIBRARY
    60 EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
    61 endif
    62 endif
    64 ifdef MOZ_NATIVE_JPEG
    65 EXTRA_DSO_LDOPTS += $(MOZ_JPEG_LIBS)
    66 endif
    68 ifdef MOZ_NATIVE_PNG
    69 EXTRA_DSO_LDOPTS += $(MOZ_PNG_LIBS)
    70 endif
    72 ifndef ZLIB_IN_MOZGLUE
    73 EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
    74 endif
    76 ifdef MOZ_NATIVE_HUNSPELL
    77 EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
    78 endif
    80 ifdef MOZ_NATIVE_LIBEVENT
    81 EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
    82 endif
    84 ifdef MOZ_NATIVE_LIBVPX
    85 EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
    86 endif
    88 ifndef MOZ_TREE_PIXMAN
    89 EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS)
    90 endif
    92 ifdef MOZ_DMD
    93 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,dmd,$(DIST)/lib)
    94 endif
    96 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
    98 ifdef MOZ_WEBRTC
    99 ifeq (WINNT,$(OS_TARGET))
   100 ifndef MOZ_HAS_WINSDK_WITH_D3D
   101 EXTRA_DSO_LDOPTS += \
   102   -LIBPATH:'$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)' \
   103   $(NULL)
   104 endif
   105 OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
   106 endif
   107 endif
   109 ifdef MOZ_ALSA
   110 EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
   111 endif
   113 ifdef HAVE_CLOCK_MONOTONIC
   114 EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
   115 endif
   117 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
   118 OS_LIBS += -lGLESv2
   119 endif
   121 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
   122 OS_LIBS += \
   123   -lui \
   124   -lmedia \
   125   -lhardware_legacy \
   126   -lhardware \
   127   -lutils \
   128   -lcutils \
   129   -lsysutils \
   130   -lcamera_client \
   131   -lsensorservice \
   132   -lstagefright \
   133   -lstagefright_foundation \
   134   -lstagefright_omx \
   135   -lbinder \
   136   -lgui \
   137   $(NULL)
   138 endif
   140 ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
   141 OS_LIBS += -lstagefright_foundation
   142 endif
   144 ifdef MOZ_WMF
   145 OS_LIBS += $(call EXPAND_LIBNAME,mfuuid wmcodecdspuuid strmiids)
   146 endif
   148 ifdef MOZ_DIRECTSHOW
   149 OS_LIBS += $(call EXPAND_LIBNAME,dmoguids wmcodecdspuuid strmiids msdmo)
   150 endif
   152 EXTRA_DSO_LDOPTS += $(LIBS_DIR)
   154 EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
   156 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
   157 OS_LIBS += \
   158   $(TK_LIBS) \
   159   $(NULL)
   160 endif
   162 ifeq (OpenBSD,$(OS_ARCH))
   163 EXTRA_DSO_LDOPTS += -lsndio
   164 endif
   166 ifdef MOZ_ENABLE_DBUS
   167 EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
   168 endif
   170 ifdef MOZ_WIDGET_GTK
   171 EXTRA_DSO_LDOPTS += $(TK_LIBS)
   172 EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(XT_LIBS) -lgthread-2.0
   173 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
   174 endif
   176 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
   177 EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS)
   178 EXTRA_DSO_LDOPTS += $(FT2_LIBS) $(MOZ_PANGO_LIBS)
   179 endif
   181 ifdef MOZ_TREE_FREETYPE
   182 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
   183 endif
   185 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
   186 EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
   187 endif
   189 ifdef MOZ_ENABLE_LIBPROXY
   190 EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
   191 endif
   193 ifeq ($(OS_ARCH),SunOS)
   194 ifdef GNU_CC
   195 EXTRA_DSO_LDOPTS += -lelf
   196 else
   197 EXTRA_DSO_LDOPTS += -lelf -ldemangle
   198 endif
   199 endif
   201 ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
   202 OS_LIBS += $(call EXPAND_LIBNAME,kvm)
   203 endif
   205 ifeq ($(OS_ARCH),FreeBSD)
   206 OS_LIBS += $(call EXPAND_LIBNAME,util)
   207 endif
   209 ifeq ($(OS_ARCH),WINNT)
   210 OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet wbemuuid wintrust)
   211 ifdef ACCESSIBILITY
   212 OS_LIBS += $(call EXPAND_LIBNAME,oleacc)
   213 endif
   214 ifdef MOZ_METRO
   215 OS_LIBS += $(call EXPAND_LIBNAME,uiautomationcore runtimeobject)
   216 endif
   217 ifdef MOZ_GAMEPAD
   218 ifdef MOZ_HAS_WINSDK_WITH_D3D
   219 OS_LIBS += $(call EXPAND_LIBNAME,dxguid dinput8)
   220 else
   221 OS_LIBS += $(call EXPAND_LIBNAME_PATH,dxguid dinput8, '$(subst \,/,$(MOZ_DIRECTX_SDK_PATH))/Lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)')
   222 endif
   223 endif
   224 endif # WINNT
   226 ifdef MOZ_JPROF
   227 EXTRA_DSO_LDOPTS += -ljprof
   228 endif
   230 ifdef MOZ_ENABLE_QT
   231 EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
   232 endif
   234 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
   235 ifdef MOZ_GSTREAMER
   236 EXTRA_DSO_LDOPTS += $(GSTREAMER_LIBS)
   237 endif
   238 endif
   240 # Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
   241 # too old to support Python pretty-printers; if this changes, we could make
   242 # this 'ifdef GNU_CC'.
   243 ifeq (Linux,$(OS_ARCH))
   244 # Create a GDB Python auto-load file alongside the libxul shared library in
   245 # the build directory.
   246 PP_TARGETS += LIBXUL_AUTOLOAD
   247 LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
   248 LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
   249 endif
   251 OS_LIBS += $(LIBICONV)
   253 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
   254 OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
   255 endif

mercurial