summaryrefslogtreecommitdiff
path: root/onlineupdate/source/update/updater/Makefile.in
blob: b465031b28324e16183a58ed753c22f6aa9b7296 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 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/.

# For changes here, also consider ./updater-xpcshell/Makefile.in

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

include $(topsrcdir)/config/rules.mk

ifneq (,$(filter beta release esr,$(MOZ_UPDATE_CHANNEL)))
	PRIMARY_CERT = release_primary.der
	SECONDARY_CERT = release_secondary.der
else ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak nightly-ux,$(MOZ_UPDATE_CHANNEL)))
	PRIMARY_CERT = nightly_aurora_level3_primary.der
	SECONDARY_CERT = nightly_aurora_level3_secondary.der
else
	PRIMARY_CERT = dep1.der
	SECONDARY_CERT = dep2.der
endif

CERT_HEADERS := primaryCert.h secondaryCert.h xpcshellCert.h

export:: $(CERT_HEADERS)

primaryCert.h: $(PRIMARY_CERT)
secondaryCert.h: $(SECONDARY_CERT)

# This is how the xpcshellCertificate.der file is generated, in case we ever
# have to regenerate it.
# ./certutil -L -d modules/libmar/tests/unit/data -n mycert -r > xpcshellCertificate.der
xpcshellCert.h: xpcshellCertificate.der

$(CERT_HEADERS): gen_cert_header.py
	$(PYTHON) $< $(@:.h=Data) $(filter-out $<,$^) > $@

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

CXXFLAGS += $(MOZ_BZ2_CFLAGS)