2004-12-06 22:39:54 +00:00
|
|
|
#
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Benjamin Smedberg <benjamin@smedbergs.us>
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2006-08-14 22:36:15 +00:00
|
|
|
ifdef MOZ_RDF
|
2006-04-18 15:52:41 +00:00
|
|
|
include $(topsrcdir)/rdf/util/src/objs.mk
|
2006-08-14 22:36:15 +00:00
|
|
|
endif
|
2006-04-18 15:52:41 +00:00
|
|
|
include $(topsrcdir)/intl/unicharutil/util/objs.mk
|
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
MODULE = libxul
|
|
|
|
LIBRARY_NAME = xul
|
|
|
|
FORCE_USE_PIC = 1
|
|
|
|
FORCE_SHARED_LIB = 1
|
2005-04-05 16:34:09 +00:00
|
|
|
MOZILLA_INTERNAL_API = 1
|
2004-12-06 22:39:54 +00:00
|
|
|
|
2008-02-29 23:24:53 +00:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
2005-06-23 16:55:52 +00:00
|
|
|
# This is going to be a framework named "XUL", not an ordinary library named
|
|
|
|
# "libxul.dylib"
|
|
|
|
LIBRARY_NAME=XUL
|
2007-08-20 00:00:11 +00:00
|
|
|
# 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
|
2005-06-23 16:55:52 +00:00
|
|
|
endif
|
|
|
|
|
2011-04-15 09:03:17 +00:00
|
|
|
VPATH += $(topsrcdir)/build/
|
|
|
|
CPPSRCS += $(STDCXX_COMPAT)
|
2004-12-06 22:39:54 +00:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
2005-11-23 14:16:33 +00:00
|
|
|
CPPSRCS += dlldeps-xul.cpp
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
2006-03-08 19:29:25 +00:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
CPPSRCS += dlldeps-xul.cpp
|
|
|
|
endif
|
|
|
|
|
2011-04-12 00:17:56 +00:00
|
|
|
ifneq (,$(MOZ_ENABLE_GTK2))
|
|
|
|
DEFINES += -DMOZ_ENABLE_GTK2
|
|
|
|
endif
|
|
|
|
|
2007-02-21 16:56:04 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
2006-01-26 19:10:50 +00:00
|
|
|
|
2006-04-06 18:06:05 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
2007-02-21 15:13:36 +00:00
|
|
|
$(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
|
|
|
$(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
2004-12-06 22:39:54 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
include $(srcdir)/libxul-config.mk
|
2004-12-09 19:28:35 +00:00
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
EXTRA_DEPS += \
|
|
|
|
$(srcdir)/libxul-config.mk \
|
|
|
|
$(srcdir)/libxul-rules.mk \
|
2006-04-18 15:52:41 +00:00
|
|
|
$(topsrcdir)/intl/unicharutil/util/objs.mk \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
GARBAGE += \
|
|
|
|
$(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
|
|
|
|
$(wildcard *.$(OBJ_SUFFIX)) \
|
2006-04-28 14:54:54 +00:00
|
|
|
dlldeps-javaxpcom.cpp \
|
2005-11-23 14:16:33 +00:00
|
|
|
$(NULL)
|
2006-08-14 22:36:15 +00:00
|
|
|
|
2010-07-29 19:22:16 +00:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/intl/unicharutil/util \
|
|
|
|
-I$(topsrcdir)/intl/unicharutil/src
|
2007-07-01 05:56:10 +00:00
|
|
|
|
2006-08-14 22:36:15 +00:00
|
|
|
ifdef MOZ_RDF
|
|
|
|
EXTRA_DEPS += \
|
|
|
|
$(topsrcdir)/rdf/util/src/objs.mk \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
GARBAGE += \
|
|
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
|
2011-04-29 10:38:26 +00:00
|
|
|
ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
|
2007-08-03 14:46:17 +00:00
|
|
|
SDK_LIBRARY = $(IMPORT_LIBRARY)
|
|
|
|
else
|
|
|
|
SDK_LIBRARY = $(SHARED_LIBRARY)
|
|
|
|
endif
|
|
|
|
|
2011-05-17 06:54:59 +00:00
|
|
|
# See bug 653662 - some builders are hitting an internal size limit
|
|
|
|
# on incremental builds. Disable this for debug builds for now. We may
|
|
|
|
# be able to revisit this after our builders are upgraded to something
|
|
|
|
# later than Visual Studio 2005.
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2007-07-25 06:17:09 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
|
2004-12-09 19:28:35 +00:00
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
DEFINES += -DIMPL_XREAPI
|
2004-12-06 22:39:54 +00:00
|
|
|
|
2010-03-04 05:02:57 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS) $(MOZALLOC_LIB)
|
2004-12-06 22:39:54 +00:00
|
|
|
|
2008-02-29 23:24:53 +00:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
2004-12-06 22:39:54 +00:00
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
2010-02-09 17:09:06 +00:00
|
|
|
OS_LIBS += \
|
2008-06-12 02:50:15 +00:00
|
|
|
-framework SystemConfiguration \
|
2005-04-04 15:45:48 +00:00
|
|
|
-framework QuickTime \
|
|
|
|
-framework IOKit \
|
2007-04-25 14:26:42 +00:00
|
|
|
-lcrypto \
|
2005-04-04 15:45:48 +00:00
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
2009-04-20 14:48:00 +00:00
|
|
|
endif
|
2008-07-30 06:50:14 +00:00
|
|
|
|
2009-04-20 14:48:00 +00:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2008-11-06 20:53:20 +00:00
|
|
|
ifdef MOZ_SYDNEYAUDIO
|
2008-07-30 06:50:14 +00:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
2009-04-20 14:48:00 +00:00
|
|
|
-framework Carbon \
|
2008-07-30 06:50:14 +00:00
|
|
|
-framework CoreAudio \
|
2009-02-13 02:26:01 +00:00
|
|
|
-framework AudioToolbox \
|
2008-07-30 06:50:14 +00:00
|
|
|
-framework AudioUnit \
|
2011-06-25 15:25:03 +00:00
|
|
|
-framework IOKit \
|
|
|
|
-framework Foundation \
|
|
|
|
-framework AppKit \
|
2008-07-30 06:50:14 +00:00
|
|
|
$(NULL)
|
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
2011-05-18 21:12:25 +00:00
|
|
|
ifneq (,$(filter GNU GNU_% NetBSD OpenBSD,$(OS_ARCH)))
|
2011-05-05 21:12:04 +00:00
|
|
|
ifdef MOZ_SYDNEYAUDIO
|
|
|
|
EXTRA_DSO_LDOPTS += -lossaudio
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2010-02-09 19:02:11 +00:00
|
|
|
ifdef MOZ_PLATFORM_MAEMO
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS)
|
2008-09-10 16:10:23 +00:00
|
|
|
endif
|
|
|
|
|
2009-11-18 15:20:45 +00:00
|
|
|
ifdef MOZ_ENABLE_LIBCONIC
|
|
|
|
EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS)
|
|
|
|
endif
|
|
|
|
|
2008-07-25 16:36:07 +00:00
|
|
|
ifdef MOZ_ENABLE_DBUS
|
2011-03-24 14:26:58 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_LIBS)
|
|
|
|
ifdef MOZ_PLATFORM_MAEMO
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
|
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
2007-06-17 16:01:40 +00:00
|
|
|
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
|
2009-02-25 15:25:12 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
|
2006-06-22 11:42:28 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
|
|
|
endif
|
|
|
|
|
2008-04-19 13:21:59 +00:00
|
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
2008-09-25 22:38:25 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0
|
2010-03-06 13:29:55 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS) $(MOZ_PANGO_LIBS)
|
2009-01-23 06:24:29 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_TREE_FREETYPE
|
2010-11-07 08:20:51 +00:00
|
|
|
ifndef MOZ_TREE_CAIRO
|
2009-01-23 06:24:29 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
2008-04-19 13:21:59 +00:00
|
|
|
endif
|
2010-11-07 08:20:51 +00:00
|
|
|
endif
|
2008-04-19 13:21:59 +00:00
|
|
|
|
2007-02-09 01:33:26 +00:00
|
|
|
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
|
|
|
|
endif
|
|
|
|
|
2010-08-03 17:44:49 +00:00
|
|
|
ifdef MOZ_ENABLE_LIBPROXY
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_LIBPROXY_LIBS)
|
|
|
|
endif
|
|
|
|
|
2008-03-20 01:13:36 +00:00
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
2010-09-18 08:15:33 +00:00
|
|
|
ifdef GNU_CC
|
|
|
|
EXTRA_DSO_LDOPTS += -lelf
|
|
|
|
else
|
2009-11-02 09:17:27 +00:00
|
|
|
EXTRA_DSO_LDOPTS += -lelf -ldemangle
|
2008-03-20 01:13:36 +00:00
|
|
|
endif
|
2010-09-18 08:15:33 +00:00
|
|
|
endif
|
2008-03-20 01:13:36 +00:00
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2011-03-22 15:43:38 +00:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi psapi ws2_32 dbghelp)
|
2004-12-06 22:39:54 +00:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
2009-11-02 09:17:27 +00:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,imagehlp)
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
2011-02-25 14:02:04 +00:00
|
|
|
ifdef MOZ_CRASHREPORTER
|
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,wininet)
|
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
endif # WINNT
|
2008-03-05 19:23:44 +00:00
|
|
|
|
2006-04-25 01:58:41 +00:00
|
|
|
ifdef MOZ_JPROF
|
|
|
|
EXTRA_DSO_LDOPTS += -ljprof
|
|
|
|
endif
|
|
|
|
|
2008-04-19 13:21:59 +00:00
|
|
|
ifdef MOZ_ENABLE_QT
|
2010-02-20 03:46:54 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) $(XEXT_LIBS)
|
2008-04-19 13:21:59 +00:00
|
|
|
endif
|
|
|
|
|
2009-11-02 09:17:27 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
|
|
|
|
include $(srcdir)/libxul-rules.mk
|
|
|
|
|
2011-04-13 00:54:18 +00:00
|
|
|
ifeq ($(OS_ARCH),OpenBSD)
|
|
|
|
# Needed by nsAuthGSSAPI
|
|
|
|
EXTRA_DSO_LDOPTS += -lkrb5 -lcrypto
|
|
|
|
endif
|
|
|
|
|
2006-01-18 17:38:58 +00:00
|
|
|
ifdef MOZ_JAVAXPCOM
|
|
|
|
dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
endif
|
2010-09-10 21:26:16 +00:00
|
|
|
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
DEFINES += -DENABLE_LAYOUTDEBUG
|
|
|
|
endif
|
|
|
|
endif
|