2004-12-07 01:39:54 +03: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-15 02:36:15 +04:00
|
|
|
ifdef MOZ_RDF
|
2006-04-18 19:52:41 +04:00
|
|
|
include $(topsrcdir)/rdf/util/src/objs.mk
|
2006-08-15 02:36:15 +04:00
|
|
|
endif
|
2006-04-18 19:52:41 +04:00
|
|
|
include $(topsrcdir)/intl/unicharutil/util/objs.mk
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
MODULE = libxul
|
|
|
|
LIBRARY_NAME = xul
|
|
|
|
FORCE_USE_PIC = 1
|
|
|
|
FORCE_SHARED_LIB = 1
|
2005-04-05 20:34:09 +04:00
|
|
|
MOZILLA_INTERNAL_API = 1
|
2004-12-07 01:39:54 +03:00
|
|
|
|
2008-03-01 02:24:53 +03:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
2005-06-23 20:55:52 +04:00
|
|
|
# This is going to be a framework named "XUL", not an ordinary library named
|
|
|
|
# "libxul.dylib"
|
|
|
|
LIBRARY_NAME=XUL
|
2007-08-20 04:00:11 +04: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 20:55:52 +04:00
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
2005-11-23 17:16:33 +03:00
|
|
|
CPPSRCS += dlldeps-xul.cpp
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
|
|
|
|
2008-03-05 22:23:44 +03:00
|
|
|
ifeq ($(OS_ARCH),WINCE)
|
|
|
|
CPPSRCS += dlldeps-xul.cpp
|
|
|
|
endif
|
|
|
|
|
2006-03-08 22:29:25 +03:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
CPPSRCS += dlldeps-xul.cpp
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
# dependent libraries
|
2007-05-01 03:52:44 +04:00
|
|
|
ifneq (,$(MOZ_ENABLE_GTK2))
|
2006-04-06 22:06:05 +04:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
2007-02-21 18:13:36 +03:00
|
|
|
$(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX)
|
2007-06-14 14:26:47 +04:00
|
|
|
DEFINES += -DMOZ_ENABLE_GTK2
|
2006-01-26 22:10:50 +03:00
|
|
|
endif
|
|
|
|
|
2007-02-21 19:56:04 +03:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
2006-01-26 22:10:50 +03:00
|
|
|
|
2006-04-06 22:06:05 +04:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
2007-02-21 18:13:36 +03: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-07 01:39:54 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2006-01-18 20:38:58 +03:00
|
|
|
ifdef MOZ_JAVAXPCOM
|
|
|
|
LOCAL_INCLUDES += \
|
|
|
|
-I$(topsrcdir)/extensions/java/xpcom/src \
|
|
|
|
-I$(JAVA_INCLUDE_PATH) \
|
|
|
|
$(NULL)
|
2006-12-12 00:07:02 +03:00
|
|
|
|
2006-01-18 20:38:58 +03:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
CPPSRCS += dlldeps-javaxpcom.cpp
|
|
|
|
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
|
|
|
|
else
|
2007-06-24 20:10:40 +04:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
CPPSRCS += dlldeps-javaxpcom.cpp
|
|
|
|
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/os2
|
|
|
|
else
|
2008-03-01 02:24:53 +03:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
2006-12-12 00:07:02 +03:00
|
|
|
EXTRA_DSO_LDOPTS += -framework JavaVM
|
|
|
|
else
|
2006-01-18 20:38:58 +03:00
|
|
|
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
|
|
|
|
endif
|
2006-12-12 00:07:02 +03:00
|
|
|
endif
|
2007-06-24 20:10:40 +04:00
|
|
|
endif
|
2006-12-12 00:07:02 +03:00
|
|
|
|
2006-04-06 22:06:05 +04:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/extensions/java/xpcom/src/$(LIB_PREFIX)javaxpcom.$(LIB_SUFFIX)
|
2006-12-12 00:07:02 +03:00
|
|
|
endif #MOZ_JAVAXPCOM
|
2006-01-18 20:38:58 +03:00
|
|
|
|
2005-11-23 17:16:33 +03:00
|
|
|
ifdef MOZ_ENABLE_LIBXUL
|
|
|
|
include $(srcdir)/libxul-config.mk
|
2004-12-09 22:28:35 +03:00
|
|
|
|
2005-11-23 17:16:33 +03:00
|
|
|
EXTRA_DEPS += \
|
|
|
|
$(srcdir)/libxul-config.mk \
|
|
|
|
$(srcdir)/libxul-rules.mk \
|
2006-04-18 19:52:41 +04: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 18:54:54 +04:00
|
|
|
dlldeps-javaxpcom.cpp \
|
2005-11-23 17:16:33 +03:00
|
|
|
$(NULL)
|
2006-08-15 02:36:15 +04:00
|
|
|
|
2007-07-01 09:56:10 +04:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/intl/unicharutil/util
|
|
|
|
|
2006-08-15 02:36:15 +04: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
|
2007-08-20 05:06:27 +04:00
|
|
|
endif
|
2007-08-03 18:46:28 +04:00
|
|
|
|
2007-08-03 18:46:17 +04:00
|
|
|
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
|
|
|
|
SDK_LIBRARY = $(IMPORT_LIBRARY)
|
|
|
|
else
|
|
|
|
SDK_LIBRARY = $(SHARED_LIBRARY)
|
|
|
|
endif
|
|
|
|
|
2005-04-04 19:45:48 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2006-04-18 19:52:41 +04:00
|
|
|
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
|
2007-07-25 10:17:09 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
|
2004-12-09 22:28:35 +03:00
|
|
|
|
2005-11-23 17:16:33 +03:00
|
|
|
ifdef MOZ_ENABLE_LIBXUL
|
|
|
|
include $(srcdir)/libxul-rules.mk
|
|
|
|
else
|
2005-11-23 18:53:03 +03:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(MOZ_COMPONENT_LIBS) \
|
|
|
|
$(MOZ_JS_LIBS) \
|
|
|
|
$(NULL)
|
2005-11-23 17:16:33 +03:00
|
|
|
endif
|
2004-12-07 01:39:54 +03:00
|
|
|
|
2005-11-23 17:16:33 +03:00
|
|
|
DEFINES += -DIMPL_XREAPI
|
2004-12-07 01:39:54 +03:00
|
|
|
|
2009-10-03 03:09:08 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
2004-12-07 01:39:54 +03:00
|
|
|
|
2008-03-01 02:24:53 +03:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
2004-12-07 01:39:54 +03:00
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
2005-04-04 19:45:48 +04:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
2008-06-12 06:50:15 +04:00
|
|
|
-framework SystemConfiguration \
|
2005-04-04 19:45:48 +04:00
|
|
|
-framework QuickTime \
|
|
|
|
-framework IOKit \
|
2007-04-25 18:26:42 +04:00
|
|
|
-lcrypto \
|
2005-04-04 19:45:48 +04:00
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
2009-04-20 18:48:00 +04:00
|
|
|
endif
|
2008-07-30 10:50:14 +04:00
|
|
|
|
2009-04-20 18:48:00 +04:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2008-11-06 23:53:20 +03:00
|
|
|
ifdef MOZ_SYDNEYAUDIO
|
2008-07-30 10:50:14 +04:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
2009-04-20 18:48:00 +04:00
|
|
|
-framework Carbon \
|
2008-07-30 10:50:14 +04:00
|
|
|
-framework CoreAudio \
|
2009-02-13 05:26:01 +03:00
|
|
|
-framework AudioToolbox \
|
2008-07-30 10:50:14 +04:00
|
|
|
-framework AudioUnit \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
|
|
|
|
2008-09-10 20:10:23 +04:00
|
|
|
ifdef MOZ_PLATFORM_HILDON
|
2009-10-14 00:20:11 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS)
|
2008-09-10 20:10:23 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NS_OSSO
|
|
|
|
EXTRA_DSO_LDOPTS += $(LIBOSSO_LIBS)
|
|
|
|
endif
|
|
|
|
|
2008-07-25 20:36:07 +04:00
|
|
|
ifdef MOZ_ENABLE_DBUS
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
|
|
|
|
2007-06-17 20:01:40 +04:00
|
|
|
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
|
2009-02-25 18:25:12 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
|
2006-06-22 15:42:28 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
|
|
|
endif
|
|
|
|
|
2008-04-19 17:21:59 +04:00
|
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
2008-09-26 02:38:25 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0
|
2008-04-19 17:21:59 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
2009-01-23 09:24:29 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_TREE_FREETYPE
|
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
2008-04-19 17:21:59 +04:00
|
|
|
endif
|
|
|
|
|
2007-02-09 04:33:26 +03:00
|
|
|
ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
|
|
|
|
endif
|
|
|
|
|
2007-03-23 02:01:14 +03:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lbe -ltracker
|
2008-03-20 04:13:43 +03:00
|
|
|
endif
|
|
|
|
|
2008-03-20 04:13:36 +03:00
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2009-10-07 22:58:41 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi)
|
2004-12-07 01:39:54 +03:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
|
|
|
endif
|
|
|
|
endif # WINNT
|
2008-03-05 22:23:44 +03:00
|
|
|
ifeq ($(OS_ARCH),WINCE)
|
2009-04-23 04:48:30 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2 ddraw)
|
2009-07-17 01:13:29 +04:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, ceosutil libcmt comsuppw)
|
2009-02-13 05:26:01 +03:00
|
|
|
ifdef WINCE_WINDOWS_MOBILE
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, cellcore)
|
|
|
|
endif
|
2009-07-09 03:34:02 +04:00
|
|
|
ifdef HAS_OGLES
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, libGLESv2 libEGL)
|
|
|
|
endif
|
2008-03-05 22:23:44 +03:00
|
|
|
endif
|
|
|
|
|
2006-01-18 20:38:58 +03:00
|
|
|
|
2006-04-25 05:58:41 +04:00
|
|
|
ifdef MOZ_JPROF
|
|
|
|
EXTRA_DSO_LDOPTS += -ljprof
|
|
|
|
endif
|
|
|
|
|
2008-04-19 17:21:59 +04:00
|
|
|
ifdef MOZ_ENABLE_QT
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
2006-01-18 20:38:58 +03:00
|
|
|
ifdef MOZ_JAVAXPCOM
|
|
|
|
dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
endif
|
2007-06-20 11:51:55 +04:00
|
|
|
|
|
|
|
ifneq (,$(filter layout-debug,$(MOZ_EXTENSIONS)))
|
|
|
|
DEFINES += -DMOZ_ENABLE_EXTENSION_LAYOUT_DEBUG
|
|
|
|
endif
|