-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Makefile
98 lines (70 loc) · 2.4 KB
/
Makefile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# https://stackoverflow.com/a/6273809
run_options := $(filter-out $@,$(MAKECMDGOALS))
.PHONY: all clean cleanassets test lint chromium opera firefox npm dig \
mv3 mv3-quick mv3-chromium mv3-firefox \
compare maxcost medcost mincost modifiers record wasm
sources := $(wildcard assets/* assets/*/* dist/version src/* src/*/* src/*/*/* src/*/*/*/*)
platform := $(wildcard platform/* platform/*/* platform/*/*/* platform/*/*/*/* platform/*/*/*/*/*)
assets := dist/build/uAssets
all: chromium firefox npm
dist/build/uBlock0.chromium: tools/make-chromium.sh $(sources) $(platform) $(assets)
tools/make-chromium.sh
# Build the extension for Chromium.
chromium: dist/build/uBlock0.chromium
dist/build/uBlock0.opera: tools/make-opera.sh $(sources) $(platform) $(assets)
tools/make-opera.sh
# Build the extension for Opera.
opera: dist/build/uBlock0.opera
dist/build/uBlock0.firefox: tools/make-firefox.sh $(sources) $(platform) $(assets)
tools/make-firefox.sh all
# Build the extension for Firefox.
firefox: dist/build/uBlock0.firefox
dist/build/uBlock0.npm: tools/make-nodejs.sh $(sources) $(platform) $(assets)
tools/make-npm.sh
# Build the Node.js package.
npm: dist/build/uBlock0.npm
lint: npm
cd dist/build/uBlock0.npm && npm run lint
test: npm
cd dist/build/uBlock0.npm && npm run test
test-full-battery: npm
cd dist/build/uBlock0.npm && npm run test-full-battery
check-leaks: npm
cd dist/build/uBlock0.npm && npm run check-leaks
dist/build/uBlock0.dig: tools/make-nodejs.sh $(sources) $(platform) $(assets)
tools/make-dig.sh
dig: dist/build/uBlock0.dig
cd dist/build/uBlock0.dig && npm install
dig-snfe: dig
cd dist/build/uBlock0.dig && npm run snfe $(run_options)
dist/build/uBOLite.chromium: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh chromium
mv3-chromium: dist/build/uBOLite.chromium
dist/build/uBOLite.firefox: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh firefox
mv3-firefox: dist/build/uBOLite.firefox
mv3-quick: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh quick
mv3-full: tools/make-mv3.sh $(sources) $(platform)
tools/make-mv3.sh full
dist/build/uAssets:
tools/pull-assets.sh
clean:
rm -rf dist/build tmp/node_modules
cleanassets:
rm -rf dist/build/mv3-data dist/build/uAssets
# Not real targets, just convenient for auto-completion at shell prompt
compare:
@echo
maxcost:
@echo
medcost:
@echo
mincost:
@echo
modifiers:
@echo
record:
@echo
wasm:
@echo