2012-04-03 12:53:07 -07:00
|
|
|
# -*- makefile -*-
|
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
|
|
|
|
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
|
|
|
|
2013-02-15 14:00:12 -08:00
|
|
|
USE_RCS_MK=1
|
|
|
|
include $(topsrcdir)/config/makefiles/makeutils.mk
|
|
|
|
|
2012-04-03 12:53:07 -07:00
|
|
|
milestone_txt = $(topsrcdir)/config/milestone.txt
|
|
|
|
|
2012-04-11 14:55:22 -07:00
|
|
|
ifeq ($(MOZ_GL_DEFAULT_PROVIDER),GLX)
|
|
|
|
DEFINES += -DUSE_GLX_TEST
|
2011-03-03 08:20:02 -08:00
|
|
|
endif
|
|
|
|
|
2013-07-12 05:56:54 -07:00
|
|
|
DEFINES += \
|
2012-05-22 07:50:04 -07:00
|
|
|
-DMOZ_APP_NAME='"$(MOZ_APP_NAME)"' \
|
2013-08-21 23:55:59 -07:00
|
|
|
-DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"' \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifdef MOZ_UPDATER
|
2012-03-21 15:50:53 -07:00
|
|
|
ifneq (android,$(MOZ_WIDGET_TOOLKIT))
|
2007-03-22 10:30:00 -07:00
|
|
|
DEFINES += -DMOZ_UPDATER
|
|
|
|
endif
|
2010-09-10 16:48:52 -07:00
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
2008-01-07 08:38:12 -08:00
|
|
|
DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
2011-11-10 16:17:46 -08:00
|
|
|
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
|
2010-12-21 12:02:14 -08:00
|
|
|
DEFINES += -DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"'
|
2010-06-03 18:16:20 -07:00
|
|
|
endif
|
|
|
|
|
2012-05-22 07:50:04 -07:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
../profile/$(LIB_PREFIX)profile_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef MOZ_UPDATER
|
|
|
|
ifneq (android,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
../mozapps/update/common/$(LIB_PREFIX)updatecommon.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_XREMOTE
|
2012-01-03 19:09:29 -08:00
|
|
|
SHARED_LIBRARY_LIBS += $(DEPTH)/widget/xremoteclient/$(LIB_PREFIX)xremote_client_s.$(LIB_SUFFIX)
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/xremoteclient
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
2013-03-10 15:00:23 -07:00
|
|
|
ifneq (,$(MOZ_CRASHREPORTER)$(MOZ_ENABLE_PROFILER_SPS))
|
2013-03-05 06:41:26 -08:00
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
2013-03-10 15:00:23 -07:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX)
|
|
|
|
$(NULL)
|
|
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
2013-03-05 06:41:26 -08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_PROFILER_SPS
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/processor/$(LIB_PREFIX)breakpad_sps_common_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
2007-04-25 07:26:42 -07:00
|
|
|
|
2013-03-10 15:00:23 -07:00
|
|
|
ifdef MOZ_CRASHREPORTER
|
|
|
|
SHARED_LIBRARY_LIBS += $(DEPTH)/toolkit/crashreporter/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX)
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
|
|
|
|
endif
|
|
|
|
|
2007-04-25 07:26:42 -07:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
2011-03-07 19:58:46 -08:00
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/mac/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
|
2013-03-10 15:00:23 -07:00
|
|
|
$(NULL)
|
2007-04-25 07:26:42 -07:00
|
|
|
endif
|
2007-05-22 13:20:55 -07:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
2010-01-12 13:14:37 -08:00
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/crash_generation/$(LIB_PREFIX)crash_generation_s.$(LIB_SUFFIX) \
|
2007-08-08 08:19:57 -07:00
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
|
2009-12-14 03:55:31 -08:00
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/$(LIB_PREFIX)minidump_writer_s.$(LIB_SUFFIX) \
|
2007-08-08 08:19:57 -07:00
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
|
2007-05-22 13:20:55 -07:00
|
|
|
$(NULL)
|
|
|
|
endif
|
2008-03-19 18:13:36 -07:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
|
|
|
SHARED_LIBRARY_LIBS += \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/solaris/handler/$(LIB_PREFIX)exception_handler_s.$(LIB_SUFFIX) \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/client/$(LIB_PREFIX)minidump_file_writer_s.$(LIB_SUFFIX) \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
|
|
|
|
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/solaris/$(LIB_PREFIX)breakpad_solaris_common_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
2013-07-04 05:28:43 -07:00
|
|
|
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-01-12 13:14:38 -08:00
|
|
|
LOCAL_INCLUDES += \
|
2012-05-22 13:45:24 -07:00
|
|
|
-I$(topsrcdir)/testing/gtest/mozilla \
|
2012-09-20 00:55:36 -07:00
|
|
|
-I$(srcdir)/../profile \
|
2010-01-12 13:14:38 -08:00
|
|
|
-I$(topsrcdir)/dom/ipc \
|
|
|
|
-I$(topsrcdir)/toolkit/crashreporter \
|
2010-12-03 00:24:17 -08:00
|
|
|
-I$(topsrcdir)/dom/base \
|
2011-05-21 23:23:20 -07:00
|
|
|
-I$(topsrcdir)/xpcom/build \
|
2011-03-07 19:58:46 -08:00
|
|
|
-I$(topsrcdir)/config \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-04-28 13:33:14 -07:00
|
|
|
CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-06-10 05:36:26 -07:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
2008-09-26 17:17:28 -07:00
|
|
|
CXXFLAGS += $(MOZ_PANGO_CFLAGS)
|
|
|
|
endif
|
|
|
|
|
2009-02-02 05:53:24 -08:00
|
|
|
DEFINES += \
|
|
|
|
-DOS_TARGET=\"$(OS_TARGET)\" \
|
|
|
|
-DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\"
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
ifdef TARGET_XPCOM_ABI
|
|
|
|
DEFINES += \
|
2011-03-07 19:58:46 -08:00
|
|
|
-DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" \
|
|
|
|
-DTARGET_OS_ABI=\"$(OS_TARGET)_$(TARGET_XPCOM_ABI)\" \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
2012-04-03 12:53:07 -07:00
|
|
|
# Should version be optional or required ?
|
|
|
|
TOOLKIT_EM_VERSION=$(shell $(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir=$(topsrcdir))
|
|
|
|
$(call warnIfEmpty,TOOLKIT_EM_VERSION)
|
|
|
|
|
|
|
|
# Valid if null: {warn,error}IfEmpty
|
|
|
|
DEFINES += -DTOOLKIT_EM_VERSION=\"$(TOOLKIT_EM_VERSION)\"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
ifdef WRAP_SYSTEM_INCLUDES
|
2011-03-07 19:58:46 -08:00
|
|
|
DEFINES += -DWRAP_SYSTEM_INCLUDES
|
2007-03-22 10:30:00 -07:00
|
|
|
endif
|
|
|
|
|
2008-01-15 07:13:59 -08:00
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
ifneq (,$(findstring lib64,$(libdir)))
|
2011-03-07 19:58:46 -08:00
|
|
|
DEFINES += -DHAVE_USR_LIB64_DIR
|
2008-01-15 07:13:59 -08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2010-01-06 08:59:44 -08:00
|
|
|
MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
|
2009-12-20 06:25:48 -08:00
|
|
|
ifdef MOZ_SOURCE_STAMP
|
2009-02-16 05:32:39 -08:00
|
|
|
|
2012-04-03 12:53:07 -07:00
|
|
|
INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
|
|
|
|
|
2013-02-15 14:00:12 -08:00
|
|
|
source_repo := $(call getSourceRepo)
|
2012-04-03 12:53:07 -07:00
|
|
|
|
|
|
|
# extra sanity check for old versions of hg, no showconfig support
|
2013-02-15 14:00:12 -08:00
|
|
|
ifneq (,$(filter http%,$(source_repo)))
|
|
|
|
INIARGS += --sourcerepo=$(source_repo)
|
2012-04-03 12:53:07 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
endif # MOZ_SOURCE_STAMP
|
|
|
|
|
|
|
|
GRE_MILESTONE := $(strip $(lastword $(shell cat $(milestone_txt) 2>/dev/null)))
|
|
|
|
GRE_BUILDID := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null)))
|
|
|
|
$(call errorIfEmpty,GRE_MILESTONE GRE_BUILDID)
|
|
|
|
|
2010-04-07 12:44:38 -07:00
|
|
|
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
|
|
|
|
|
2011-10-10 17:40:17 -07:00
|
|
|
ifdef MOZILLA_OFFICIAL
|
|
|
|
DEFINES += -DMOZILLA_OFFICIAL
|
|
|
|
endif
|
|
|
|
|
|
|
|
DEFINES += -DAPP_VERSION=$(MOZ_APP_VERSION)
|
|
|
|
|
2012-10-18 05:44:12 -07:00
|
|
|
DEFINES += -DAPP_ID="$(MOZ_APP_ID)"
|
2011-10-24 13:07:33 -07:00
|
|
|
|
2012-04-03 12:53:07 -07:00
|
|
|
$(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(milestone_txt)
|
2010-04-07 12:44:38 -07:00
|
|
|
|
2007-07-02 11:20:24 -07:00
|
|
|
platform.ini: FORCE
|
2012-04-03 12:53:07 -07:00
|
|
|
$(PYTHON) $(srcdir)/make-platformini.py --buildid=$(GRE_BUILDID) $(INIARGS) $(milestone_txt) > $@
|
2007-07-02 11:20:24 -07:00
|
|
|
|
2008-02-09 02:37:42 -08:00
|
|
|
GARBAGE += platform.ini
|
|
|
|
|
2007-07-02 11:20:24 -07:00
|
|
|
libs:: platform.ini
|
|
|
|
$(INSTALL) $^ $(DIST)/bin
|
|
|
|
|
|
|
|
install::
|
|
|
|
$(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)
|