toolkit/library/libxul.mk

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial