|
1 # This Source Code Form is subject to the terms of the Mozilla Public |
|
2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
4 |
|
5 STANDALONE_MAKEFILE := 1 |
|
6 |
|
7 include $(topsrcdir)/config/rules.mk |
|
8 |
|
9 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in |
|
10 |
|
11 MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in |
|
12 |
|
13 DEFINES += \ |
|
14 -DAB_CD=$(AB_CD) \ |
|
15 -DMOZ_APP_NAME=$(MOZ_APP_NAME) \ |
|
16 -DPREF_DIR=$(PREF_DIR) \ |
|
17 $(NULL) |
|
18 |
|
19 DEFINES += -DJAREXT= |
|
20 |
|
21 DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) |
|
22 |
|
23 # Set MSVC dlls version to package, if any. |
|
24 ifdef WIN32_REDIST_DIR |
|
25 DEFINES += -DMOZ_MSVC_REDIST=$(_MSC_VER) |
|
26 endif |
|
27 |
|
28 ifdef ENABLE_MARIONETTE |
|
29 DEFINES += -DENABLE_MARIONETTE=1 |
|
30 endif |
|
31 |
|
32 ifdef MOZ_PKG_MANIFEST_P |
|
33 MOZ_PKG_MANIFEST = package-manifest |
|
34 endif |
|
35 |
|
36 MOZ_PACKAGER_MINIFY=1 |
|
37 |
|
38 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk |
|
39 |
|
40 # Note that JS_BINARY can be defined in packager.mk, so this test must come after |
|
41 # including that file. MOZ_PACKAGER_MINIFY_JS is used in packager.mk, but since |
|
42 # recipe evaluation is deferred, we can set it here after the inclusion. |
|
43 ifneq (,$(JS_BINARY)) |
|
44 MOZ_PACKAGER_MINIFY_JS=1 |
|
45 endif |
|
46 |
|
47 ifeq (bundle, $(MOZ_FS_LAYOUT)) |
|
48 BINPATH = $(_BINPATH) |
|
49 DEFINES += -DAPPNAME=$(_APPNAME) |
|
50 else |
|
51 # Every other platform just winds up in dist/bin |
|
52 BINPATH = bin |
|
53 endif |
|
54 DEFINES += -DBINPATH=$(BINPATH) |
|
55 |
|
56 ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) |
|
57 DEFINES += -DMOZ_SHARED_MOZGLUE=1 |
|
58 endif |
|
59 |
|
60 ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS))) |
|
61 DEFINES += -DMOZ_RTSP |
|
62 endif |
|
63 |
|
64 ifdef GKMEDIAS_SHARED_LIBRARY |
|
65 DEFINES += -DGKMEDIAS_SHARED_LIBRARY |
|
66 endif |
|
67 |
|
68 ifdef MOZ_PKG_MANIFEST_P |
|
69 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE |
|
70 $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@) |
|
71 ifdef MOZ_CHROME_MULTILOCALE |
|
72 printf '\n[multilocale]\n' >> $@ |
|
73 for LOCALE in $(MOZ_CHROME_MULTILOCALE) ;\ |
|
74 do \ |
|
75 printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \ |
|
76 printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \ |
|
77 done |
|
78 endif |
|
79 |
|
80 GARBAGE += $(MOZ_PKG_MANIFEST) |
|
81 endif |
|
82 |
|
83 ifdef FXOS_SIMULATOR |
|
84 .PHONY: simulator |
|
85 simulator: make-package |
|
86 @echo 'Building simulator addon...' |
|
87 $(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM) |
|
88 |
|
89 default:: simulator |
|
90 |
|
91 # Ensure copying Simulator xpi to ftp |
|
92 UPLOAD_EXTRA_FILES += fxos-simulator-*-*.xpi |
|
93 endif |