2008-04-18 06:41:49 -07: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.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# the Mozilla Foundation <http://www.mozilla.org/>.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2007
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Mark Finkle <mfinkle@mozilla.com>
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either 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 *****
|
|
|
|
|
2011-11-17 06:24:55 -08:00
|
|
|
DEPTH = ../../..
|
2008-04-18 06:41:49 -07:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2010-09-10 19:52:48 -07:00
|
|
|
DIRS = profile/extensions
|
|
|
|
|
2008-04-18 06:41:49 -07:00
|
|
|
PREF_JS_EXPORTS = $(srcdir)/mobile.js
|
2011-11-28 22:38:35 -08:00
|
|
|
DIST_FILES = recommended-addons.json
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2010-01-29 08:15:37 -08:00
|
|
|
ifndef LIBXUL_SDK
|
2011-08-24 03:55:13 -07:00
|
|
|
ifneq (Android,$(OS_TARGET))
|
2010-01-29 08:15:37 -08:00
|
|
|
PROGRAM=$(MOZ_APP_NAME)$(BIN_SUFFIX)
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
2010-11-15 07:38:21 -08:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
2011-08-03 11:22:07 -07:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
|
2011-11-22 12:48:22 -08:00
|
|
|
LOCAL_INCLUDES += -I$(DEPTH)/build
|
2010-01-29 08:15:37 -08:00
|
|
|
|
2011-08-03 11:22:07 -07:00
|
|
|
DEFINES += -DXPCOM_GLUE
|
|
|
|
STL_FLAGS=
|
2010-06-10 20:50:51 -07:00
|
|
|
|
2011-05-23 09:54:47 -07:00
|
|
|
LIBS += \
|
2011-08-03 11:22:07 -07:00
|
|
|
$(EXTRA_DSO_LIBS) \
|
|
|
|
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
|
2011-05-23 09:54:47 -07:00
|
|
|
$(NULL)
|
2010-01-29 08:15:37 -08:00
|
|
|
|
2011-10-28 05:13:57 -07:00
|
|
|
ifeq ($(MOZ_PLATFORM_MAEMO),6)
|
|
|
|
LIBS += \
|
2012-01-03 19:09:29 -08:00
|
|
|
$(LIBXUL_DIST)/../widget/qt/faststartupqt/$(LIB_PREFIX)faststartupqt.$(LIB_SUFFIX) \
|
2011-10-28 05:13:57 -07:00
|
|
|
$(MOZ_QT_LIBS) \
|
|
|
|
$(NULL)
|
2012-01-03 19:09:29 -08:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/qt/faststartupqt $(TK_CFLAGS)
|
2011-10-28 05:13:57 -07:00
|
|
|
endif
|
|
|
|
|
2010-04-06 05:48:34 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,version)
|
2010-01-29 08:15:37 -08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef _MSC_VER
|
|
|
|
# Always enter a Windows program through wmain, whether or not we're
|
|
|
|
# a console application.
|
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
|
|
|
endif
|
2011-08-24 03:55:13 -07:00
|
|
|
endif
|
2010-01-29 08:15:37 -08:00
|
|
|
endif #LIBXUL_SDK
|
|
|
|
|
2011-08-03 11:29:15 -07:00
|
|
|
# Make sure the standalone glue doesn't try to get libxpcom.so from mobile/app.
|
2011-08-03 11:22:07 -07:00
|
|
|
NSDISTMODE = copy
|
|
|
|
|
2008-04-18 06:41:49 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2009-01-23 13:29:27 -08:00
|
|
|
APP_ICON = mobile
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2011-11-22 12:48:22 -08:00
|
|
|
DEFINES += \
|
|
|
|
-DAPP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DAPP_VERSION=$(MOZ_APP_VERSION) \
|
|
|
|
-DMOZ_UPDATER=$(MOZ_UPDATER) \
|
|
|
|
$(NULL)
|
2009-01-29 07:40:41 -08:00
|
|
|
|
2009-05-18 22:47:48 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
REDIT_PATH = $(LIBXUL_DIST)/bin
|
|
|
|
endif
|
|
|
|
|
2008-04-18 06:41:49 -07:00
|
|
|
APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
|
|
|
|
|
2010-04-06 05:48:34 -07:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
2008-04-18 06:41:49 -07:00
|
|
|
|
|
|
|
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
|
|
|
APP_VERSION = $(MOZ_APP_VERSION)
|
|
|
|
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
APP_NAME := $(APP_NAME)Debug
|
|
|
|
endif
|
|
|
|
|
|
|
|
AB_CD = $(MOZ_UI_LOCALE)
|
|
|
|
|
|
|
|
AB := $(firstword $(subst -, ,$(AB_CD)))
|
|
|
|
|
|
|
|
clean clobber repackage::
|
|
|
|
rm -rf $(DIST)/$(APP_NAME).app
|
|
|
|
|
2010-04-06 05:48:34 -07:00
|
|
|
ifdef LIBXUL_SDK
|
2008-04-18 06:41:49 -07:00
|
|
|
APPFILES = Resources
|
2010-04-06 05:48:34 -07:00
|
|
|
else
|
|
|
|
APPFILES = MacOS
|
|
|
|
endif
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2011-11-22 12:48:22 -08:00
|
|
|
libs repackage::
|
2008-04-18 06:41:49 -07:00
|
|
|
mkdir -p $(DIST)/$(APP_NAME).app/Contents/MacOS
|
2011-07-17 03:07:42 -07:00
|
|
|
rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj
|
2008-04-18 06:41:49 -07:00
|
|
|
mkdir -p $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
2011-07-17 03:07:42 -07:00
|
|
|
rsync -a --exclude "*.in" $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj
|
2008-04-18 06:41:49 -07:00
|
|
|
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" -e "s/%APP_BINARY%/$(APP_BINARY)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist
|
|
|
|
sed -e "s/%APP_VERSION%/$(APP_VERSION)/" -e "s/%APP_NAME%/$(APP_NAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings
|
|
|
|
rsync -a $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)
|
|
|
|
$(RM) $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/mangle $(DIST)/$(APP_NAME).app/Contents/$(APPFILES)/shlibsign
|
2010-04-06 05:48:34 -07:00
|
|
|
ifdef LIBXUL_SDK
|
2008-04-18 06:41:49 -07:00
|
|
|
cp $(LIBXUL_DIST)/bin/xulrunner$(BIN_SUFFIX) $(DIST)/$(APP_NAME).app/Contents/MacOS/$(APP_BINARY)
|
|
|
|
rsync -a --exclude nsinstall --copy-unsafe-links $(LIBXUL_DIST)/XUL.framework $(DIST)/$(APP_NAME).app/Contents/Frameworks
|
|
|
|
else
|
2010-04-06 05:48:34 -07:00
|
|
|
rm -f $(DIST)/$(APP_NAME).app/Contents/MacOS/$(PROGRAM)
|
|
|
|
rsync -aL $(PROGRAM) $(DIST)/$(APP_NAME).app/Contents/MacOS
|
|
|
|
endif
|
|
|
|
printf "APPLMOZB" > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2010-04-06 05:48:34 -07:00
|
|
|
else # MOZ_WIDGET_TOOLKIT != cocoa
|
2010-01-29 08:15:37 -08:00
|
|
|
|
2008-04-18 06:41:49 -07:00
|
|
|
libs::
|
2010-01-29 08:15:37 -08:00
|
|
|
ifdef LIBXUL_SDK
|
2008-04-18 06:41:49 -07:00
|
|
|
cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY)
|
2010-01-29 08:15:37 -08:00
|
|
|
endif
|
2009-08-16 15:20:45 -07:00
|
|
|
ifndef SKIP_COPY_XULRUNNER
|
2010-01-29 08:15:37 -08:00
|
|
|
ifdef LIBXUL_SDK
|
2008-04-18 06:41:49 -07:00
|
|
|
$(NSINSTALL) -D $(DIST)/bin/xulrunner
|
|
|
|
(cd $(LIBXUL_SDK)/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DIST)/bin/xulrunner && tar -xf -)
|
2010-01-29 08:15:37 -08:00
|
|
|
endif
|
2009-08-16 15:20:45 -07:00
|
|
|
endif # SKIP_COPY_XULRUNNER
|
2008-04-18 06:41:49 -07:00
|
|
|
|
2011-10-28 05:13:57 -07:00
|
|
|
ifeq ($(MOZ_PLATFORM_MAEMO),6)
|
|
|
|
$(NSINSTALL) -D $(DIST)/bin/res/drawable
|
|
|
|
cp $(topsrcdir)/mobile/app/maemo/* $(DIST)/bin/res/drawable/
|
|
|
|
cp $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/content/favicon32.png $(DIST)/bin/res/drawable/
|
|
|
|
endif
|
2009-01-23 13:29:27 -08:00
|
|
|
$(NSINSTALL) -D $(DIST)/bin/chrome/icons/default
|
|
|
|
|
2011-04-14 10:54:59 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2009-01-23 13:29:27 -08:00
|
|
|
cp $(srcdir)/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
2010-03-03 21:46:36 -08:00
|
|
|
$(REDIT_PATH)/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(srcdir)/$(APP_ICON).ico
|
2009-01-23 13:29:27 -08:00
|
|
|
endif
|
|
|
|
|
2008-04-18 06:41:49 -07:00
|
|
|
endif
|