toolkit/mozapps/update/updater/Makefile.in
author Ehsan Akhgari <ehsan@mozilla.com>
Tue, 04 Feb 2014 13:57:34 -0500
changeset 167175 b54e8c328c327943fe5662e9e84bf748a1f97564
parent 158693 942d149a7c0c6c4f85f8c212a2414f58b90585f7
child 167190 6a25e4cef8da57f6f5cc361b47ffda171c943a64
permissions -rw-r--r--
Bug 944800 - Move the information about delay loaded DLLs into moz.build; r=gps

# vim:set ts=8 sw=8 sts=8 noet:
# 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/.

# Don't link the updater against libmozglue. See bug 687139
MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =

LOCAL_INCLUDES += \
  -I$(srcdir)/../common \
  -I$(topsrcdir)/xpcom/glue \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon-standalone,../common-standalone)
else
LIBS += $(call EXPAND_LIBNAME_PATH,updatecommon,../common)
endif

LIBS += \
  $(call EXPAND_LIBNAME_PATH,mar,$(DEPTH)/modules/libmar/src) \
  $(MOZ_BZ2_LIBS) \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
LIBS += $(call EXPAND_LIBNAME_PATH,verifymar,$(DEPTH)/modules/libmar/verify)
USE_STATIC_LIBS = 1
RCINCLUDE = updater.rc
OS_LIBS += $(call EXPAND_LIBNAME,delayimp comctl32 ws2_32 shell32 shlwapi)
ifndef GNU_CC
RCFLAGS += -I$(srcdir)
else
RCFLAGS += --include-dir $(srcdir)
endif

endif

ifdef MOZ_WIDGET_GTK
OS_CXXFLAGS += $(TK_CFLAGS)
OS_LIBS += $(TK_LIBS)
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
OS_LIBS += -framework Cocoa
endif

ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) #{
STL_FLAGS =
OS_LIBS += -lcutils -lsysutils
# clear out all the --wrap flags and remove dependency on mozglue for Gonk
WRAP_LDFLAGS :=
endif #}

ifndef MOZ_WINCONSOLE
ifdef MOZ_DEBUG
MOZ_WINCONSOLE = 1
else
MOZ_WINCONSOLE = 0
endif
endif

include $(topsrcdir)/config/rules.mk

ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif

ifdef MOZ_WIDGET_GTK
libs:: updater.png
	$(NSINSTALL) -D $(DIST)/bin/icons
	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
libs::
	$(NSINSTALL) -D $(DIST)/bin/updater.app
	rsync -a -C --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app 
	sed -e 's/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
	  iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/updater.app/Contents/Resources/English.lproj/InfoPlist.strings
	$(NSINSTALL) -D $(DIST)/bin/updater.app/Contents/MacOS
	$(NSINSTALL) $(DIST)/bin/updater $(DIST)/bin/updater.app/Contents/MacOS
	rm -f $(DIST)/bin/updater
endif

ifeq (,$(filter-out WINNT,$(OS_ARCH)))
# Pick up nsWindowsRestart.cpp
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
endif

ifeq ($(OS_ARCH),WINNT)
EXTRA_LIBS += $(call EXPAND_LIBNAME,crypt32)
EXTRA_LIBS += $(call EXPAND_LIBNAME,advapi32)
endif

CXXFLAGS += $(MOZ_BZ2_CFLAGS)

ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
RCFLAGS += -DMAR_SIGNING_RELEASE_BETA=1
else
ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak,$(MOZ_UPDATE_CHANNEL)))
RCFLAGS += -DMAR_SIGNING_AURORA_NIGHTLY=1
endif
endif