mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
691 lines
14 KiB
Makefile
691 lines
14 KiB
Makefile
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
DEPTH = @DEPTH@
|
|
topsrcdir = @top_srcdir@
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
include $(topsrcdir)/rdf/util/src/objs.mk
|
|
include $(topsrcdir)/intl/unicharutil/util/objs.mk
|
|
|
|
MODULE = libxul
|
|
LIBRARY_NAME = xul
|
|
FORCE_SHARED_LIB = 1
|
|
MOZILLA_INTERNAL_API = 1
|
|
|
|
ifdef MOZ_METRO
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
DIRS += winvccorlib
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
|
# This is going to be a framework named "XUL", not an ordinary library named
|
|
# "libxul.dylib"
|
|
LIBRARY_NAME=XUL
|
|
# Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
|
|
# setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
|
|
# as-is so that dependencies of the form -ltracemalloc still work.
|
|
MAKE_FRAMEWORK=1
|
|
endif
|
|
|
|
VPATH += $(topsrcdir)/build/
|
|
|
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
|
CPPSRCS += dlldeps-xul.cpp
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
CPPSRCS += dlldeps-xul.cpp
|
|
endif
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
$(DEPTH)/toolkit/components/osfile/$(LIB_PREFIX)osfile_s.$(LIB_SUFFIX) \
|
|
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
|
$(NULL)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
|
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
|
$(NULL)
|
|
|
|
CPPSRCS += \
|
|
nsStaticXULComponents.cpp \
|
|
$(NULL)
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
CPPSRCS += \
|
|
nsDllMain.cpp \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
|
CPPSRCS += \
|
|
nsGFXDeps.cpp \
|
|
$(NULL)
|
|
|
|
RCINCLUDE = xulrunner.rc
|
|
|
|
ifndef MOZ_NATIVE_ZLIB
|
|
CPPSRCS += dlldeps-zlib.cpp
|
|
endif
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/windows
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
CPPSRCS += \
|
|
nsGFXDeps.cpp \
|
|
$(NULL)
|
|
|
|
ifndef MOZ_NATIVE_ZLIB
|
|
CPPSRCS += dlldeps-zlib.cpp
|
|
endif
|
|
|
|
RESFILE = xulrunos2.res
|
|
RCFLAGS += -i $(topsrcdir)/widget/os2
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/os2
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
|
endif
|
|
|
|
# dependent libraries
|
|
STATIC_LIBS += \
|
|
jsipc_s \
|
|
domipc_s \
|
|
domplugins_s \
|
|
mozipc_s \
|
|
mozipdlgen_s \
|
|
ipcshell_s \
|
|
gfxipc_s \
|
|
hal_s \
|
|
dombindings_s \
|
|
$(NULL)
|
|
|
|
ifdef MOZ_B2G_RIL #{
|
|
STATIC_LIBS += mozril_s
|
|
endif #}
|
|
|
|
ifdef MOZ_B2G_BT #{
|
|
STATIC_LIBS += mozdbus_s mozipcunixsocket_s
|
|
endif #}
|
|
|
|
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
|
STATIC_LIBS += moznetd_s
|
|
endif
|
|
|
|
ifdef MOZ_B2G_CAMERA #{
|
|
OS_LIBS += -lstagefright -lstagefright_omx
|
|
endif #}
|
|
|
|
ifdef MOZ_IPDL_TESTS
|
|
STATIC_LIBS += ipdlunittest_s
|
|
endif
|
|
|
|
ifeq (Linux,$(OS_ARCH))
|
|
ifneq (Android,$(OS_TARGET))
|
|
OS_LIBS += -lrt
|
|
endif
|
|
endif
|
|
|
|
STATIC_LIBS += \
|
|
xpcom_core \
|
|
ucvutil_s \
|
|
chromium_s \
|
|
snappy_s \
|
|
$(NULL)
|
|
|
|
# component libraries
|
|
COMPONENT_LIBS += \
|
|
necko \
|
|
uconv \
|
|
i18n \
|
|
chardet \
|
|
jar$(VERSION_NUMBER) \
|
|
startupcache \
|
|
pref \
|
|
htmlpars \
|
|
identity \
|
|
imglib2 \
|
|
mediasniffer \
|
|
gkgfx \
|
|
gklayout \
|
|
docshell \
|
|
embedcomponents \
|
|
webbrwsr \
|
|
nsappshell \
|
|
txmgr \
|
|
commandlines \
|
|
toolkitcomps \
|
|
pipboot \
|
|
pipnss \
|
|
appcomps \
|
|
jsreflect \
|
|
composer \
|
|
telemetry \
|
|
jsinspector \
|
|
jsdebugger \
|
|
storagecomps \
|
|
rdf \
|
|
windowds \
|
|
$(NULL)
|
|
|
|
ifdef BUILD_CTYPES
|
|
COMPONENT_LIBS += \
|
|
jsctypes \
|
|
$(NULL)
|
|
endif
|
|
|
|
COMPONENT_LIBS += \
|
|
jsperf \
|
|
gkplugin \
|
|
$(NULL)
|
|
|
|
ifdef MOZ_XUL
|
|
ifdef MOZ_ENABLE_GTK2
|
|
COMPONENT_LIBS += \
|
|
unixproxy \
|
|
$(NULL)
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
COMPONENT_LIBS += \
|
|
osxproxy \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_XUL
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
|
COMPONENT_LIBS += \
|
|
unixproxy \
|
|
$(NULL)
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
|
COMPONENT_LIBS += \
|
|
windowsproxy \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifneq (,$(filter android,$(MOZ_WIDGET_TOOLKIT)))
|
|
COMPONENT_LIBS += \
|
|
androidproxy \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_JSDEBUGGER
|
|
DEFINES += -DMOZ_JSDEBUGGER
|
|
COMPONENT_LIBS += \
|
|
jsd \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_PREF_EXTENSIONS
|
|
DEFINES += -DMOZ_PREF_EXTENSIONS
|
|
COMPONENT_LIBS += \
|
|
autoconfig \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_AUTH_EXTENSION
|
|
COMPONENT_LIBS += auth
|
|
DEFINES += -DMOZ_AUTH_EXTENSION
|
|
endif
|
|
|
|
ifdef MOZ_PERMISSIONS
|
|
COMPONENT_LIBS += cookie permissions
|
|
DEFINES += -DMOZ_PERMISSIONS
|
|
endif
|
|
|
|
ifdef MOZ_UNIVERSALCHARDET
|
|
COMPONENT_LIBS += universalchardet
|
|
DEFINES += -DMOZ_UNIVERSALCHARDET
|
|
endif
|
|
|
|
ifeq (,$(filter android gonk qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
|
ifdef MOZ_XUL
|
|
COMPONENT_LIBS += fileview
|
|
DEFINES += -DMOZ_FILEVIEW
|
|
endif
|
|
endif
|
|
|
|
ifdef MOZ_PLACES
|
|
COMPONENT_LIBS += \
|
|
places \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_XUL
|
|
COMPONENT_LIBS += \
|
|
tkautocomplete \
|
|
satchel \
|
|
pippki \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_GTK2
|
|
COMPONENT_LIBS += widget_gtk2
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_GTK2
|
|
ifdef MOZ_X11
|
|
STATIC_LIBS += gtkxtbin
|
|
endif
|
|
endif
|
|
|
|
# Platform-specific icon channel stuff - supported mostly-everywhere
|
|
ifneq (,$(filter windows os2 mac cocoa gtk2 qt android,$(MOZ_WIDGET_TOOLKIT)))
|
|
DEFINES += -DICON_DECODER
|
|
COMPONENT_LIBS += imgicon
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
|
|
COMPONENT_LIBS += widget_android
|
|
STATIC_LIBS += skia_npapi
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
|
|
COMPONENT_LIBS += widget_gonk
|
|
endif
|
|
|
|
STATIC_LIBS += thebes gl ycbcr
|
|
|
|
ifdef MOZ_ENABLE_PROFILER_SPS
|
|
COMPONENT_LIBS += profiler
|
|
endif
|
|
|
|
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
|
COMPONENT_LIBS += widget_windows
|
|
ifdef MOZ_METRO
|
|
COMPONENT_LIBS += widget_winrt
|
|
endif
|
|
endif
|
|
ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
|
|
COMPONENT_LIBS += wdgtos2
|
|
endif
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
COMPONENT_LIBS += widget_mac
|
|
endif
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
|
COMPONENT_LIBS += widget_qt
|
|
endif
|
|
|
|
ifdef ACCESSIBILITY
|
|
COMPONENT_LIBS += accessibility
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_XREMOTE
|
|
COMPONENT_LIBS += remoteservice
|
|
endif
|
|
|
|
ifdef MOZ_SPELLCHECK
|
|
DEFINES += -DMOZ_SPELLCHECK
|
|
COMPONENT_LIBS += spellchecker
|
|
endif
|
|
|
|
ifdef MOZ_ZIPWRITER
|
|
DEFINES += -DMOZ_ZIPWRITER
|
|
COMPONENT_LIBS += zipwriter
|
|
endif
|
|
|
|
COMPONENT_LIBS += services-crypto
|
|
|
|
ifdef MOZ_DEBUG
|
|
ifdef ENABLE_TESTS
|
|
COMPONENT_LIBS += gkdebug
|
|
endif
|
|
endif
|
|
|
|
ifdef MOZ_GIO_COMPONENT
|
|
DEFINES += -DMOZ_GIO_COMPONENT
|
|
COMPONENT_LIBS += nkgio
|
|
endif
|
|
|
|
ifdef MOZ_APP_COMPONENT_LIBS
|
|
COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
|
|
endif
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
|
OS_LIBS += -framework OpenGL -lcups
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
$(LIBS_DIR) \
|
|
$(MOZ_JS_LIBS) \
|
|
$(NSS_LIBS) \
|
|
$(MOZ_CAIRO_OSLIBS) \
|
|
$(MOZ_APP_EXTRA_LIBS) \
|
|
$(SQLITE_LIBS) \
|
|
$(NULL)
|
|
|
|
ifdef MOZ_NATIVE_JPEG
|
|
EXTRA_DSO_LDOPTS += $(MOZ_JPEG_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_NATIVE_PNG
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PNG_LIBS)
|
|
endif
|
|
|
|
ifneq (WINNT,$(OS_ARCH))
|
|
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_NATIVE_HUNSPELL
|
|
EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_NATIVE_LIBEVENT
|
|
EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_NATIVE_LIBVPX
|
|
EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
|
|
endif
|
|
|
|
ifndef MOZ_TREE_PIXMAN
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_DMD
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,dmd,$(DIST)/lib)
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
|
|
|
|
ifdef MOZ_WEBRTC
|
|
ifdef MOZ_PEERCONNECTION
|
|
COMPONENT_LIBS += peerconnection
|
|
endif
|
|
ifdef MOZ_WEBRTC_SIGNALING
|
|
EXTRA_DSO_LDOPTS += \
|
|
$(DEPTH)/media/mtransport/build/$(LIB_PREFIX)mtransport.$(LIB_SUFFIX) \
|
|
$(DEPTH)/media/webrtc/signaling/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
|
|
$(DEPTH)/media/webrtc/signaling/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
|
|
$(NULL)
|
|
endif
|
|
ifdef MOZ_WEBRTC_IN_LIBXUL
|
|
include $(topsrcdir)/media/webrtc/shared_libs.mk
|
|
EXTRA_DSO_LDOPTS += $(WEBRTC_LIBS)
|
|
ifeq (WINNT,$(OS_TARGET))
|
|
EXTRA_DSO_LDOPTS += \
|
|
-LIBPATH:"$(MOZ_DIRECTX_SDK_PATH)/lib/$(MOZ_DIRECTX_SDK_CPU_SUFFIX)" \
|
|
$(NULL)
|
|
OS_LIBS += $(call EXPAND_LIBNAME,secur32 crypt32 iphlpapi strmiids dmoguids wmcodecdspuuid amstrmid msdmo wininet)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
|
|
ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
|
|
ifdef MOZ_ALSA
|
|
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
|
|
endif
|
|
ifdef MOZ_PULSEAUDIO
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
|
|
endif
|
|
endif
|
|
|
|
ifdef HAVE_CLOCK_MONOTONIC
|
|
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
|
|
endif
|
|
|
|
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
|
OS_LIBS += -lGLESv2
|
|
endif
|
|
|
|
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
|
OS_LIBS += \
|
|
-lui \
|
|
-lmedia \
|
|
-lhardware_legacy \
|
|
-lhardware \
|
|
-lutils \
|
|
-lcutils \
|
|
-lsysutils \
|
|
-lcamera_client \
|
|
-lbinder \
|
|
-lsensorservice \
|
|
-ldbus \
|
|
-lstagefright \
|
|
-lstagefright_omx \
|
|
-lbinder \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_WMF
|
|
OS_LIBS += $(call EXPAND_LIBNAME,mfuuid)
|
|
endif
|
|
|
|
EXTRA_DEPS += \
|
|
$(topsrcdir)/intl/unicharutil/util/objs.mk \
|
|
$(topsrcdir)/rdf/util/src/objs.mk \
|
|
$(NULL)
|
|
|
|
CPPSRCS += \
|
|
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
$(NULL)
|
|
|
|
GARBAGE += \
|
|
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
$(NULL)
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/intl/unicharutil/util \
|
|
-I$(topsrcdir)/intl/unicharutil/src
|
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
|
SDK_LIBRARY = $(IMPORT_LIBRARY)
|
|
else
|
|
SDK_LIBRARY = $(SHARED_LIBRARY)
|
|
endif
|
|
|
|
# See bug 653662 - some builders are hitting an internal size limit on
|
|
# incremental builds. Disable incremental linking for debug builds on VC8 or
|
|
# on 32-bit hosts.
|
|
# See: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c34d5c37-ca4a-4580-9c7c-4379a8c76d1f/
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
IS_32BIT_HOST := $(if $(filter AMD64,$(PROCESSOR_ARCHITECTURE) $(PROCESSOR_ARCHITEW6432)),,yes)
|
|
ifneq (,$(or $(filter 1400,$(_MSC_VER)),$(IS_32BIT_HOST)))
|
|
ifdef MOZ_DEBUG
|
|
EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
|
|
|
|
DEFINES += -DIMPL_XREAPI
|
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
|
CXXFLAGS += $(TK_CFLAGS)
|
|
OS_LIBS += \
|
|
-framework SystemConfiguration \
|
|
-framework QTKit \
|
|
-framework IOKit \
|
|
-F/System/Library/PrivateFrameworks -framework CoreUI \
|
|
$(TK_LIBS) \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
ifdef MOZ_SYDNEYAUDIO
|
|
OS_LIBS += \
|
|
-framework Carbon \
|
|
-framework CoreAudio \
|
|
-framework AudioToolbox \
|
|
-framework AudioUnit \
|
|
-framework IOKit \
|
|
-framework Foundation \
|
|
-framework AppKit \
|
|
-framework Security \
|
|
$(NULL)
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter NetBSD OpenBSD,$(OS_ARCH)))
|
|
ifdef MOZ_SYDNEYAUDIO
|
|
EXTRA_DSO_LDOPTS += -lossaudio
|
|
endif
|
|
endif
|
|
|
|
ifeq (OpenBSD,$(OS_ARCH))
|
|
ifdef MOZ_CUBEB
|
|
EXTRA_DSO_LDOPTS += -lsndio
|
|
endif
|
|
endif
|
|
|
|
ifdef MOZ_PLATFORM_MAEMO
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_LIBCONIC
|
|
EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_DBUS
|
|
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
|
|
endif
|
|
|
|
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
|
endif
|
|
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS)
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS) $(MOZ_PANGO_LIBS)
|
|
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/../widget/qt/faststartupqt/$(LIB_PREFIX)faststartupqt.$(LIB_SUFFIX)
|
|
endif
|
|
|
|
ifdef MOZ_TREE_FREETYPE
|
|
ifndef MOZ_TREE_CAIRO
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
|
endif
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
|
|
EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_LIBPROXY
|
|
EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
|
ifdef GNU_CC
|
|
EXTRA_DSO_LDOPTS += -lelf
|
|
else
|
|
EXTRA_DSO_LDOPTS += -lelf -ldemangle
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
|
|
OS_LIBS += $(call EXPAND_LIBNAME,kvm)
|
|
# keep `environ' unresolved, see bug 14426 for binutils
|
|
EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
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)
|
|
ifdef ACCESSIBILITY
|
|
OS_LIBS += $(call EXPAND_LIBNAME,oleacc)
|
|
endif
|
|
ifdef MOZ_METRO
|
|
OS_LIBS += $(call EXPAND_LIBNAME,uiautomationcore)
|
|
endif
|
|
ifdef _MSC_VER
|
|
OS_LIBS += $(call EXPAND_LIBNAME,delayimp)
|
|
EXTRA_DSO_LDOPTS += \
|
|
-DELAYLOAD:psapi.dll \
|
|
-DELAYLOAD:dbghelp.dll \
|
|
-DELAYLOAD:rasapi32.dll \
|
|
-DELAYLOAD:rasdlg.dll \
|
|
-DELAYLOAD:comdlg32.dll \
|
|
-DELAYLOAD:winspool.drv \
|
|
-DELAYLOAD:secur32.dll \
|
|
-DELAYLOAD:wininet.dll \
|
|
$(NULL)
|
|
|
|
# See nsDllMain for an explanation
|
|
ifdef MOZ_METRO
|
|
ifdef MOZ_DEBUG
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:VCCORLIB$(CRTDLLVERSION)D.DLL
|
|
else
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:VCCORLIB$(CRTDLLVERSION).DLL
|
|
endif
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:API-MS-WIN-CORE-WINRT-L$(CRTEXPDLLVERSION).DLL
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:API-MS-WIN-CORE-WINRT-STRING-L$(CRTEXPDLLVERSION).DLL
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:uiautomationcore.dll
|
|
endif
|
|
|
|
ifdef ACCESSIBILITY
|
|
EXTRA_DSO_LDOPTS += -DELAYLOAD:oleacc.dll
|
|
endif
|
|
endif
|
|
endif # WINNT
|
|
|
|
ifdef MOZ_JPROF
|
|
EXTRA_DSO_LDOPTS += -ljprof
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
|
|
endif
|
|
|
|
ifdef MOZ_GSTREAMER
|
|
EXTRA_DSO_LDOPTS += $(GSTREAMER_LIBS)
|
|
endif
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
|
|
$(INSTALL) $^ .
|
|
|
|
# need widget/windows for resource.h (included from widget.rc)
|
|
LOCAL_INCLUDES += \
|
|
-I$(topsrcdir)/config \
|
|
-I$(topsrcdir)/widget/windows \
|
|
$(NULL)
|
|
|
|
OS_LIBS += $(LIBICONV)
|
|
|
|
DEFINES += \
|
|
-D_IMPL_NS_COM \
|
|
-D_IMPL_NS_STRINGAPI \
|
|
-DEXPORT_XPT_API \
|
|
-DEXPORT_XPTC_API \
|
|
-D_IMPL_NS_GFX \
|
|
-D_IMPL_NS_WIDGET \
|
|
$(NULL)
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
|
OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OpenBSD)
|
|
# Needed by nsAuthGSSAPI
|
|
EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
|
|
endif
|
|
|
|
ifdef MOZ_DEBUG
|
|
ifdef ENABLE_TESTS
|
|
DEFINES += -DENABLE_LAYOUTDEBUG
|
|
endif
|
|
endif
|
|
|
|
ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
|
|
# Wrap linker to measure peak virtual memory usage.
|
|
LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)
|
|
endif
|