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
|
|
|
|
2006-03-28 20:06:17 +00:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
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
|
|
|
|
DLL_PREFIX=
|
|
|
|
DLL_SUFFIX=
|
|
|
|
endif
|
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
REQUIRES = \
|
|
|
|
xpcom \
|
|
|
|
string \
|
2004-12-09 19:28:35 +00:00
|
|
|
$(ZLIB_REQUIRES) \
|
2005-03-18 21:24:05 +00:00
|
|
|
xulapp \
|
2004-12-06 22:39:54 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
# dependent libraries
|
2006-04-06 18:06:05 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
|
2004-12-06 22:39:54 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2006-01-26 19:10:50 +00:00
|
|
|
ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
|
2006-04-06 18:06:05 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX)
|
2006-01-26 19:10:50 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
2006-04-06 18:06:05 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
2006-04-06 19:59:00 +00:00
|
|
|
$(foreach component,$(COMPONENT_LIBS),$(DIST)/lib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
2006-04-18 15:52:41 +00:00
|
|
|
$(foreach lib,$(STATIC_LIBS),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
2004-12-06 22:39:54 +00:00
|
|
|
$(NULL)
|
|
|
|
|
2006-01-18 17:38:58 +00:00
|
|
|
ifdef MOZ_JAVAXPCOM
|
|
|
|
LOCAL_INCLUDES += \
|
|
|
|
-I$(topsrcdir)/extensions/java/xpcom/src \
|
|
|
|
-I$(JAVA_INCLUDE_PATH) \
|
|
|
|
$(NULL)
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
CPPSRCS += dlldeps-javaxpcom.cpp
|
|
|
|
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
|
|
|
|
else
|
|
|
|
LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
|
|
|
|
endif
|
2006-04-06 18:06:05 +00:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/extensions/java/xpcom/src/$(LIB_PREFIX)javaxpcom.$(LIB_SUFFIX)
|
2006-01-18 17:38:58 +00:00
|
|
|
endif
|
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
ifdef MOZ_ENABLE_LIBXUL
|
|
|
|
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)
|
|
|
|
|
|
|
|
REQUIRES += \
|
|
|
|
uconv \
|
|
|
|
unicharutil \
|
|
|
|
$(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
|
|
|
|
|
|
|
ifdef MOZ_RDF
|
|
|
|
EXTRA_DEPS += \
|
|
|
|
$(topsrcdir)/rdf/util/src/objs.mk \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
REQUIRES += \
|
|
|
|
rdf \
|
|
|
|
rdfutil \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
GARBAGE += \
|
|
|
|
$(RDF_UTIL_SRC_LCPPSRCS) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2006-04-22 21:35:02 +00:00
|
|
|
else
|
|
|
|
ifdef NS_TRACE_MALLOC
|
|
|
|
EXTRA_DSO_LIBS += tracemalloc
|
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
2005-04-04 15:45:48 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2006-04-18 15:52:41 +00:00
|
|
|
export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
|
2004-12-09 19:28:35 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
|
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
ifdef MOZ_ENABLE_LIBXUL
|
|
|
|
include $(srcdir)/libxul-rules.mk
|
|
|
|
else
|
2005-11-23 15:53:03 +00:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(MOZ_COMPONENT_LIBS) \
|
|
|
|
$(MOZ_JS_LIBS) \
|
|
|
|
$(NULL)
|
2006-01-27 13:48:12 +00:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
|
|
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -lgtksuperwin
|
|
|
|
endif
|
2005-11-23 14:16:33 +00:00
|
|
|
endif
|
2004-12-06 22:39:54 +00:00
|
|
|
|
2005-11-23 14:16:33 +00:00
|
|
|
DEFINES += -DIMPL_XREAPI
|
2004-12-06 22:39:54 +00:00
|
|
|
|
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
|
|
|
|
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
2005-04-04 15:45:48 +00:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
-framework Cocoa \
|
|
|
|
-framework QuickTime \
|
|
|
|
-framework IOKit \
|
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
2004-12-10 18:15:15 +00:00
|
|
|
ifdef MOZ_ENABLE_XINERAMA
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_XINERAMA_LIBS)
|
|
|
|
endif
|
|
|
|
|
2006-01-04 15:56:53 +00:00
|
|
|
ifneq (,$(filter gtk gtk2 qt xlib,$(MOZ_WIDGET_TOOLKIT)))
|
2004-12-10 18:58:34 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(MOZ_GTK_LDFLAGS) $(MOZ_XFT_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS)
|
2006-01-04 15:56:53 +00:00
|
|
|
endif
|
2004-12-10 18:15:15 +00:00
|
|
|
|
2006-06-22 11:42:28 +00:00
|
|
|
ifdef MOZ_ENABLE_XFT
|
|
|
|
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
|
|
|
endif
|
|
|
|
|
2004-12-10 18:15:15 +00:00
|
|
|
ifdef MOZ_ENABLE_XPRINT
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
2004-12-06 22:39:54 +00:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
2005-10-11 17:13:04 +00:00
|
|
|
EXTRA_DSO_LDOPTS += -lbe -ltracker
|
2004-12-06 22:39:54 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2006-04-18 15:52:41 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32)
|
2004-12-06 22:39:54 +00:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
|
|
|
endif
|
|
|
|
endif # WINNT
|
2006-01-18 17:38:58 +00:00
|
|
|
|
2006-04-25 01:58:41 +00:00
|
|
|
ifdef MOZ_JPROF
|
|
|
|
EXTRA_DSO_LDOPTS += -ljprof
|
|
|
|
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
|