blob: f06fb2028df2e2153bb08b4b20362945486ac9e5 (
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
|
# Chrome Extension #############################################################
all: stage-chrome
package: $(build-dir)/fiveui.crx
chrome-dir := $(path)
chrome-build := $(build-dir)/chrome
# Generic Extension Parts ######################################################
# pull in the base fiveui extension
$(eval $(call stage-fiveui,$(chrome-build),stage-chrome))
# Chrome File Staging ##########################################################
# copy over scripts from the chrome extension
$(chrome-build)/data/js/%: $(chrome-dir)/js/% | $(chrome-build)/data/js
$(call cmd,cp)
$(chrome-build)/data/injected/%: $(chrome-dir)/injected/% | $(chrome-build)/data/injected
$(call cmd,cp)
$(chrome-build)/data/%: $(chrome-dir)/% | $(chrome-build)/data
$(call cmd,cp)
$(chrome-build)/%: $(chrome-dir)/% | $(chrome-build)
$(call cmd,cp)
$(chrome-build): | $(build-dir)
$(call cmd,mkdir)
# Packaging ####################################################################
.PHONY: stage-chrome
stage-chrome: $(chrome-build)/manifest.json \
$(chrome-build)/data/background.html \
$(chrome-build)/data/js/platform-port.js \
$(chrome-build)/data/js/platform-background.js \
| $(chrome-build)
# generate the executable after copying over all files
$(build-dir)/fiveui.crx: stage-chrome
$(call label,MAKECRX $(call drop-prefix,$@)) ( cd $(build-dir) \
&& $(topdir)/tools/bin/makecrx $(chrome-build) \
$(topdir)/fiveui.pem fiveui \
$(redir) )
|