toolkit/library/libxul.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/library/libxul.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,255 @@
     1.4 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 +# You can obtain one at http://mozilla.org/MPL/2.0/.
     1.7 +
     1.8 +ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
     1.9 +# This is going to be a framework named "XUL", not an ordinary library named
    1.10 +# "libxul.dylib"
    1.11 +SHARED_LIBRARY_NAME=XUL
    1.12 +# Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
    1.13 +# setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
    1.14 +# as-is so that dependencies of the form -ltracemalloc still work.
    1.15 +MAKE_FRAMEWORK=1
    1.16 +else
    1.17 +SHARED_LIBRARY_NAME=xul
    1.18 +endif
    1.19 +
    1.20 +SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,xul,$(DEPTH)/toolkit/library)
    1.21 +
    1.22 +EXTRA_DEPS += $(topsrcdir)/toolkit/library/libxul.mk
    1.23 +
    1.24 +# dependent libraries
    1.25 +ifdef MOZ_B2G_BT_BLUEZ #{
    1.26 +ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
    1.27 +OS_LIBS += -ldbus
    1.28 +endif
    1.29 +endif #}
    1.30 +
    1.31 +ifdef MOZ_B2G_CAMERA #{
    1.32 +OS_LIBS += -lstagefright -lstagefright_omx
    1.33 +endif #}
    1.34 +
    1.35 +ifeq (Linux,$(OS_ARCH))
    1.36 +ifneq (Android,$(OS_TARGET))
    1.37 +OS_LIBS += -lrt
    1.38 +EXTRA_DSO_LDOPTS += -Wl,-version-script,symverscript
    1.39 +
    1.40 +symverscript: $(topsrcdir)/toolkit/library/symverscript.in
    1.41 +	$(call py_action,preprocessor, \
    1.42 +		-DVERSION='$(SHARED_LIBRARY_NAME)$(MOZILLA_SYMBOLVERSION)' $< -o $@)
    1.43 +
    1.44 +EXTRA_DEPS += symverscript
    1.45 +endif
    1.46 +endif
    1.47 +
    1.48 +ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
    1.49 +OS_LIBS += -lcups
    1.50 +endif
    1.51 +
    1.52 +EXTRA_DSO_LDOPTS += \
    1.53 +  $(LIBS_DIR) \
    1.54 +  $(MOZ_JS_LIBS) \
    1.55 +  $(NSS_LIBS) \
    1.56 +  $(MOZ_CAIRO_OSLIBS) \
    1.57 +  $(MOZ_APP_EXTRA_LIBS) \
    1.58 +  $(SQLITE_LIBS) \
    1.59 +  $(NULL)
    1.60 +
    1.61 +ifdef ENABLE_INTL_API
    1.62 +ifdef JS_SHARED_LIBRARY
    1.63 +EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
    1.64 +endif
    1.65 +endif
    1.66 +
    1.67 +ifdef MOZ_NATIVE_JPEG
    1.68 +EXTRA_DSO_LDOPTS += $(MOZ_JPEG_LIBS)
    1.69 +endif
    1.70 +
    1.71 +ifdef MOZ_NATIVE_PNG
    1.72 +EXTRA_DSO_LDOPTS += $(MOZ_PNG_LIBS)
    1.73 +endif
    1.74 +
    1.75 +ifndef ZLIB_IN_MOZGLUE
    1.76 +EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
    1.77 +endif
    1.78 +
    1.79 +ifdef MOZ_NATIVE_HUNSPELL
    1.80 +EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
    1.81 +endif
    1.82 +
    1.83 +ifdef MOZ_NATIVE_LIBEVENT
    1.84 +EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
    1.85 +endif
    1.86 +
    1.87 +ifdef MOZ_NATIVE_LIBVPX
    1.88 +EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
    1.89 +endif
    1.90 +
    1.91 +ifndef MOZ_TREE_PIXMAN
    1.92 +EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS)
    1.93 +endif
    1.94 +
    1.95 +ifdef MOZ_DMD
    1.96 +EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,dmd,$(DIST)/lib)
    1.97 +endif
    1.98 +
    1.99 +EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
   1.100 +
   1.101 +ifdef MOZ_WEBRTC
   1.102 +ifeq (WINNT,$(OS_TARGET))
   1.103 +ifndef MOZ_HAS_WINSDK_WITH_D3D
   1.104 +EXTRA_DSO_LDOPTS += \
   1.105 +  -LIBPATH:'$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)' \
   1.106 +  $(NULL)
   1.107 +endif
   1.108 +OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
   1.109 +endif
   1.110 +endif
   1.111 +
   1.112 +ifdef MOZ_ALSA
   1.113 +EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
   1.114 +endif
   1.115 +
   1.116 +ifdef HAVE_CLOCK_MONOTONIC
   1.117 +EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
   1.118 +endif
   1.119 +
   1.120 +ifeq (android,$(MOZ_WIDGET_TOOLKIT))
   1.121 +OS_LIBS += -lGLESv2
   1.122 +endif
   1.123 +
   1.124 +ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
   1.125 +OS_LIBS += \
   1.126 +  -lui \
   1.127 +  -lmedia \
   1.128 +  -lhardware_legacy \
   1.129 +  -lhardware \
   1.130 +  -lutils \
   1.131 +  -lcutils \
   1.132 +  -lsysutils \
   1.133 +  -lcamera_client \
   1.134 +  -lsensorservice \
   1.135 +  -lstagefright \
   1.136 +  -lstagefright_foundation \
   1.137 +  -lstagefright_omx \
   1.138 +  -lbinder \
   1.139 +  -lgui \
   1.140 +  $(NULL)
   1.141 +endif
   1.142 +
   1.143 +ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
   1.144 +OS_LIBS += -lstagefright_foundation
   1.145 +endif
   1.146 +
   1.147 +ifdef MOZ_WMF
   1.148 +OS_LIBS += $(call EXPAND_LIBNAME,mfuuid wmcodecdspuuid strmiids)
   1.149 +endif
   1.150 +
   1.151 +ifdef MOZ_DIRECTSHOW
   1.152 +OS_LIBS += $(call EXPAND_LIBNAME,dmoguids wmcodecdspuuid strmiids msdmo)
   1.153 +endif
   1.154 +
   1.155 +EXTRA_DSO_LDOPTS += $(LIBS_DIR)
   1.156 +
   1.157 +EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
   1.158 +
   1.159 +ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
   1.160 +OS_LIBS += \
   1.161 +  $(TK_LIBS) \
   1.162 +  $(NULL)
   1.163 +endif
   1.164 +
   1.165 +ifeq (OpenBSD,$(OS_ARCH))
   1.166 +EXTRA_DSO_LDOPTS += -lsndio
   1.167 +endif
   1.168 +
   1.169 +ifdef MOZ_ENABLE_DBUS
   1.170 +EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
   1.171 +endif
   1.172 +
   1.173 +ifdef MOZ_WIDGET_GTK
   1.174 +EXTRA_DSO_LDOPTS += $(TK_LIBS)
   1.175 +EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(XT_LIBS) -lgthread-2.0
   1.176 +EXTRA_DSO_LDOPTS += $(FT2_LIBS)
   1.177 +endif
   1.178 +
   1.179 +ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
   1.180 +EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS)
   1.181 +EXTRA_DSO_LDOPTS += $(FT2_LIBS) $(MOZ_PANGO_LIBS)
   1.182 +endif
   1.183 +
   1.184 +ifdef MOZ_TREE_FREETYPE
   1.185 +EXTRA_DSO_LDOPTS += $(FT2_LIBS)
   1.186 +endif
   1.187 +
   1.188 +ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
   1.189 +EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
   1.190 +endif
   1.191 +
   1.192 +ifdef MOZ_ENABLE_LIBPROXY
   1.193 +EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
   1.194 +endif
   1.195 +
   1.196 +ifeq ($(OS_ARCH),SunOS)
   1.197 +ifdef GNU_CC
   1.198 +EXTRA_DSO_LDOPTS += -lelf
   1.199 +else
   1.200 +EXTRA_DSO_LDOPTS += -lelf -ldemangle
   1.201 +endif
   1.202 +endif
   1.203 +
   1.204 +ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
   1.205 +OS_LIBS += $(call EXPAND_LIBNAME,kvm)
   1.206 +endif
   1.207 +
   1.208 +ifeq ($(OS_ARCH),FreeBSD)
   1.209 +OS_LIBS += $(call EXPAND_LIBNAME,util)
   1.210 +endif
   1.211 +
   1.212 +ifeq ($(OS_ARCH),WINNT)
   1.213 +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)
   1.214 +ifdef ACCESSIBILITY
   1.215 +OS_LIBS += $(call EXPAND_LIBNAME,oleacc)
   1.216 +endif
   1.217 +ifdef MOZ_METRO
   1.218 +OS_LIBS += $(call EXPAND_LIBNAME,uiautomationcore runtimeobject)
   1.219 +endif
   1.220 +ifdef MOZ_GAMEPAD
   1.221 +ifdef MOZ_HAS_WINSDK_WITH_D3D
   1.222 +OS_LIBS += $(call EXPAND_LIBNAME,dxguid dinput8)
   1.223 +else
   1.224 +OS_LIBS += $(call EXPAND_LIBNAME_PATH,dxguid dinput8, '$(subst \,/,$(MOZ_DIRECTX_SDK_PATH))/Lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)')
   1.225 +endif
   1.226 +endif
   1.227 +endif # WINNT
   1.228 +
   1.229 +ifdef MOZ_JPROF
   1.230 +EXTRA_DSO_LDOPTS += -ljprof
   1.231 +endif
   1.232 +
   1.233 +ifdef MOZ_ENABLE_QT
   1.234 +EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
   1.235 +endif
   1.236 +
   1.237 +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
   1.238 +ifdef MOZ_GSTREAMER
   1.239 +EXTRA_DSO_LDOPTS += $(GSTREAMER_LIBS)
   1.240 +endif
   1.241 +endif
   1.242 +
   1.243 +# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
   1.244 +# too old to support Python pretty-printers; if this changes, we could make
   1.245 +# this 'ifdef GNU_CC'.
   1.246 +ifeq (Linux,$(OS_ARCH))
   1.247 +# Create a GDB Python auto-load file alongside the libxul shared library in
   1.248 +# the build directory.
   1.249 +PP_TARGETS += LIBXUL_AUTOLOAD
   1.250 +LIBXUL_AUTOLOAD = $(topsrcdir)/toolkit/library/libxul.so-gdb.py.in
   1.251 +LIBXUL_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
   1.252 +endif
   1.253 +
   1.254 +OS_LIBS += $(LIBICONV)
   1.255 +
   1.256 +ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
   1.257 +OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
   1.258 +endif

mercurial