2004-08-06 01:38:24 +04:00
|
|
|
# vim:set ts=8 sw=8 sts=8 et:
|
2012-05-21 15:12:37 +04: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/.
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2012-08-04 22:26:44 +04:00
|
|
|
DEPTH = @DEPTH@
|
2011-03-08 06:58:46 +03:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2005-03-07 20:41:05 +03:00
|
|
|
PREF_JS_EXPORTS = $(srcdir)/xulrunner.js
|
2005-06-23 20:55:52 +04:00
|
|
|
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js)
|
2005-03-25 04:31:29 +03:00
|
|
|
|
|
|
|
DEFINES += -DAB_CD=$(AB_CD)
|
|
|
|
|
2004-12-20 08:54:06 +03:00
|
|
|
DEFINES += -DXULRUNNER_PROGNAME=\"xulrunner\"
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2008-03-22 07:25:34 +03:00
|
|
|
ifdef TARGET_XPCOM_ABI
|
|
|
|
DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\"
|
|
|
|
endif
|
|
|
|
|
2012-06-07 12:41:59 +04:00
|
|
|
DEFINES += -DXPCOM_GLUE
|
|
|
|
STL_FLAGS=
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2004-12-20 08:54:06 +03:00
|
|
|
LOCAL_INCLUDES += \
|
2011-03-08 06:58:46 +03:00
|
|
|
-I$(topsrcdir)/toolkit/xre \
|
|
|
|
-I$(topsrcdir)/toolkit/profile \
|
|
|
|
-I$(topsrcdir)/xpcom/base \
|
2012-06-07 12:41:59 +04:00
|
|
|
-I$(topsrcdir)/xpcom/build \
|
2011-03-08 06:58:46 +03:00
|
|
|
$(NULL)
|
2004-11-24 03:39:16 +03:00
|
|
|
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2004-08-06 01:38:24 +04:00
|
|
|
TK_LIBS := -framework Cocoa $(TK_LIBS)
|
2005-11-23 19:27:49 +03:00
|
|
|
endif
|
|
|
|
|
2005-11-23 17:16:33 +03:00
|
|
|
LIBS += \
|
2012-06-07 12:41:59 +04:00
|
|
|
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
2011-03-08 06:58:46 +03:00
|
|
|
$(NULL)
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
ifndef MOZ_WINCONSOLE
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
MOZ_WINCONSOLE = 1
|
|
|
|
else
|
|
|
|
MOZ_WINCONSOLE = 0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2008-12-07 07:25:09 +03: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.
|
2004-08-06 01:38:24 +04:00
|
|
|
NSDISTMODE = copy
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2007-12-31 18:15:43 +03:00
|
|
|
ifdef _MSC_VER
|
|
|
|
# Always enter a Windows program through wmain, whether or not we're
|
|
|
|
# a console application.
|
2008-03-12 02:32:26 +03:00
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
2007-12-31 18:15:43 +03:00
|
|
|
endif
|
|
|
|
|
2004-08-06 01:38:24 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2006-04-20 16:59:02 +04:00
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
|
2004-09-11 03:43:17 +04:00
|
|
|
RCINCLUDE = splash.rc
|
2004-08-06 01:38:24 +04:00
|
|
|
ifndef GNU_CC
|
2004-09-11 03:43:17 +04:00
|
|
|
RCFLAGS += -DMOZ_XULRUNNER -I$(srcdir)
|
2004-08-06 01:38:24 +04:00
|
|
|
else
|
2004-09-11 03:43:17 +04:00
|
|
|
RCFLAGS += -DMOZ_XULRUNNER --include-dir $(srcdir)
|
2004-08-06 01:38:24 +04:00
|
|
|
endif
|
|
|
|
ifdef DEBUG
|
|
|
|
RCFLAGS += -DDEBUG
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2004-09-11 03:43:17 +04:00
|
|
|
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
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2004-09-11 03:43:17 +04:00
|
|
|
DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\"
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
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 16:36:26 +04:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
2004-09-11 03:43:17 +04:00
|
|
|
libs::
|
2008-12-07 07:25:09 +03: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
|
2004-08-06 01:38:24 +04:00
|
|
|
endif
|
|
|
|
|
2004-09-11 03:43:17 +04:00
|
|
|
# XXX applications would need to supply this file
|
2004-08-06 01:38:24 +04:00
|
|
|
#export:: brand.dtd.in
|
2011-05-16 17:51:21 +04:00
|
|
|
# $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $^ > brand.dtd
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2004-09-11 03:43:17 +04: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 16:36:26 +04:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
2008-01-19 03:52:09 +03:00
|
|
|
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
|
2008-01-30 08:38:52 +03:00
|
|
|
cp $(srcdir)/default32.png $(DIST)/branding/default32.png
|
2008-01-30 01:22:09 +03:00
|
|
|
cp $(srcdir)/default48.png $(DIST)/branding/default48.png
|
2004-09-11 03:43:17 +04:00
|
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
cp $(srcdir)/xulrunner-os2.ico $(DIST)/branding/xulrunner.ico
|
|
|
|
endif
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2009-09-19 06:59:53 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2005-06-23 20:55:52 +04:00
|
|
|
FRAMEWORK_NAME = XUL
|
|
|
|
FRAMEWORK_VERSION = $(MOZILLA_VERSION)
|
2004-08-06 01:38:24 +04:00
|
|
|
|
2011-09-25 21:48:50 +04: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
|
2005-06-23 20:55:52 +04:00
|
|
|
rm -f $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current \
|
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib \
|
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/XUL \
|
2012-07-25 09:43:22 +04:00
|
|
|
$(DIST)/$(FRAMEWORK_NAME).framework/xulrunner
|
2005-06-23 20:55:52 +04: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-25 09:43:22 +04:00
|
|
|
ln -s Versions/Current/xulrunner $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
clean clobber::
|
2005-06-23 20:55:52 +04:00
|
|
|
rm -rf $(DIST)/$(FRAMEWORK_NAME).framework
|
2004-08-06 01:38:24 +04:00
|
|
|
endif
|
|
|
|
|
2012-03-23 21:57:23 +04:00
|
|
|
README_FILE = $(srcdir)/../README.xulrunner
|
2004-08-06 01:38:24 +04:00
|
|
|
|
|
|
|
libs::
|
2008-12-07 07:25:09 +03:00
|
|
|
$(INSTALL) $(IFLAGS1) $(README_FILE) $(DIST)/bin
|
|
|
|
$(INSTALL) $(IFLAGS1) $(topsrcdir)/LICENSE $(DIST)/bin
|