2007-03-22 10:30:00 -07:00
|
|
|
# vim:set ts=8 sw=8 sts=8 et:
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2011-03-07 19:58:46 -08:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
PREF_JS_EXPORTS = $(srcdir)/xulrunner.js
|
|
|
|
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js)
|
|
|
|
|
|
|
|
DEFINES += -DAB_CD=$(AB_CD)
|
|
|
|
|
|
|
|
DEFINES += -DXULRUNNER_PROGNAME=\"xulrunner\"
|
|
|
|
|
2008-03-21 21:25:34 -07:00
|
|
|
ifdef TARGET_XPCOM_ABI
|
|
|
|
DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\"
|
|
|
|
endif
|
|
|
|
|
2012-06-07 01:41:59 -07:00
|
|
|
DEFINES += -DXPCOM_GLUE
|
|
|
|
STL_FLAGS=
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
LOCAL_INCLUDES += \
|
2011-03-07 19:58:46 -08:00
|
|
|
-I$(topsrcdir)/toolkit/xre \
|
|
|
|
-I$(topsrcdir)/toolkit/profile \
|
|
|
|
-I$(topsrcdir)/xpcom/base \
|
2012-06-07 01:41:59 -07:00
|
|
|
-I$(topsrcdir)/xpcom/build \
|
2011-03-07 19:58:46 -08:00
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-09-18 19:59:53 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
TK_LIBS := -framework Cocoa $(TK_LIBS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBS += \
|
2012-06-07 01:41:59 -07:00
|
|
|
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
2011-03-07 19:58:46 -08:00
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifndef MOZ_WINCONSOLE
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
MOZ_WINCONSOLE = 1
|
|
|
|
else
|
|
|
|
MOZ_WINCONSOLE = 0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-12-06 20:25:09 -08:00
|
|
|
# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
|
|
|
|
# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
|
2007-03-22 10:30:00 -07:00
|
|
|
NSDISTMODE = copy
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2007-12-31 07:15:43 -08:00
|
|
|
ifdef _MSC_VER
|
|
|
|
# Always enter a Windows program through wmain, whether or not we're
|
|
|
|
# a console application.
|
2008-03-11 16:32:26 -07:00
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
2007-12-31 07:15:43 -08:00
|
|
|
endif
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
|
|
|
|
RCINCLUDE = splash.rc
|
|
|
|
ifndef GNU_CC
|
|
|
|
RCFLAGS += -DMOZ_XULRUNNER -I$(srcdir)
|
|
|
|
else
|
|
|
|
RCFLAGS += -DMOZ_XULRUNNER --include-dir $(srcdir)
|
|
|
|
endif
|
|
|
|
ifdef DEBUG
|
|
|
|
RCFLAGS += -DDEBUG
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
RESFILE=splashos2.res
|
|
|
|
RCFLAGS += -DMOZ_XULRUNNER
|
|
|
|
ifdef DEBUG
|
|
|
|
RCFLAGS += -DDEBUG
|
|
|
|
endif
|
|
|
|
RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
#
|
|
|
|
# Control the default heap size.
|
|
|
|
# This is the heap returned by GetProcessHeap().
|
|
|
|
# As we use the CRT heap, the default size is too large and wastes VM.
|
|
|
|
#
|
|
|
|
# The default heap size is 1MB on Win32.
|
|
|
|
# The heap will grow if need be.
|
|
|
|
#
|
|
|
|
# Set it to 256k. See bug 127069.
|
|
|
|
#
|
|
|
|
ifndef GNU_CC
|
|
|
|
LDFLAGS += /HEAP:0x40000
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-06-10 05:36:26 -07:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
2007-03-22 10:30:00 -07:00
|
|
|
libs::
|
2008-12-06 20:25:09 -08:00
|
|
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
|
|
|
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
|
|
|
|
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
# XXX applications would need to supply this file
|
|
|
|
#export:: brand.dtd.in
|
2011-05-16 06:51:21 -07:00
|
|
|
# $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $^ > brand.dtd
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
export::
|
|
|
|
$(NSINSTALL) -D $(DIST)/branding
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
cp $(srcdir)/xulrunner.ico $(DIST)/branding/xulrunner.ico
|
|
|
|
cp $(srcdir)/xulrunner.ico $(DIST)/branding/app.ico
|
|
|
|
cp $(srcdir)/document.ico $(DIST)/branding/document.ico
|
|
|
|
endif
|
2013-06-10 05:36:26 -07:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
2008-01-18 16:52:09 -08:00
|
|
|
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
|
2008-01-29 21:38:52 -08:00
|
|
|
cp $(srcdir)/default32.png $(DIST)/branding/default32.png
|
2008-01-29 14:22:09 -08:00
|
|
|
cp $(srcdir)/default48.png $(DIST)/branding/default48.png
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
cp $(srcdir)/xulrunner-os2.ico $(DIST)/branding/xulrunner.ico
|
|
|
|
endif
|
|
|
|
|
2009-09-18 19:59:53 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
FRAMEWORK_NAME = XUL
|
|
|
|
FRAMEWORK_VERSION = $(MOZILLA_VERSION)
|
|
|
|
|
2011-09-25 10:48:50 -07:00
|
|
|
FRAMEWORK_DIR = \
|
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)
|
|
|
|
|
|
|
|
$(FRAMEWORK_DIR)/Resources:
|
|
|
|
$(NSINSTALL) -D $@
|
|
|
|
|
|
|
|
libs:: $(PROGRAM) $(FRAMEWORK_DIR)/Resources
|
|
|
|
$(NSINSTALL) $(srcdir)/macbuild/InfoPlist.strings $(FRAMEWORK_DIR)/Resources
|
|
|
|
sed -e "s/APP_VERSION/$(APP_VERSION)/" $(srcdir)/macbuild/Info.plist.in > $(FRAMEWORK_DIR)/Info.plist
|
|
|
|
rsync -av $(DIST)/bin/ $(FRAMEWORK_DIR) --exclude mangle --exclude shlibsign
|
2007-03-22 10:30:00 -07:00
|
|
|
rm -f $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current \
|
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib \
|
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/XUL \
|
2012-07-24 22:43:22 -07:00
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/xulrunner
|
2007-03-22 10:30:00 -07:00
|
|
|
ln -s $(FRAMEWORK_VERSION) $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current
|
|
|
|
ln -s Versions/Current/libxpcom.dylib $(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib
|
|
|
|
ln -s Versions/Current/XUL $(DIST)/$(FRAMEWORK_NAME).framework/XUL
|
2012-07-24 22:43:22 -07:00
|
|
|
ln -s Versions/Current/xulrunner $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
clean clobber::
|
|
|
|
rm -rf $(DIST)/$(FRAMEWORK_NAME).framework
|
|
|
|
endif
|
|
|
|
|
2012-03-23 10:57:23 -07:00
|
|
|
README_FILE = $(srcdir)/../README.xulrunner
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
libs::
|
2008-12-06 20:25:09 -08:00
|
|
|
$(INSTALL) $(IFLAGS1) $(README_FILE) $(DIST)/bin
|
|
|
|
$(INSTALL) $(IFLAGS1) $(topsrcdir)/LICENSE $(DIST)/bin
|