aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: b848d8579c73ff1a31626322386db44a6e3824b0 (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
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
99
100
101
102
103
# *****************************************************************************

#    ηMatrix - a browser extension to black/white list requests.
#    Copyright (C) 2019 Alessio Vanni

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.

#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.

#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see {http://www.gnu.org/licenses/}.

#    uMatrix Home: https://github.com/gorhill/uMatrix

# To build the XPI we explicitly list every file for these reasons:
# 1) Some editors (like mine) automatically generate a backup file,
#    and always removing it before building the archive is bothersome
#    (and I don't trust my scripting skills to make it automatic)
# 2) It gives some flexibility in that files can be created or deleted
#    freely as long as they are not part of any of these lists

ROOTMETA := bootstrap.js install.rdf options.xul chrome.manifest \
	    icon.png LICENSE.txt

ROOTHTML := about.html asset-viewer.html background.html cloud-ui.html \
	    dashboard.html hosts-files.html logger-ui.html \
	    main-blocked.html popup.html raw-settings.html settings.html \
	    user-rules.html

ROOTOTHER := frameScript.js frameModule.js

ROOT := $(ROOTMETA) $(ROOTHTML) $(ROOTOTHER)

ASSETS := assets/assets.json

CSSSHEET := css/cloud-ui.css css/common.css css/dashboard-common.css \
	    css/dashboard.css css/hosts-files.css css/legacy-toolbar-button.css \
	    css/logger-ui.css css/popup.css css/raw-settings.css \
	    css/user-rules.css

CSSFONTS := css/fonts/fontawesome-webfont.ttf \
	    css/fonts/Roboto_Condensed/LICENSE.txt \
	    css/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf \
	    css/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf \
	    css/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf

CSS := $(CSSSHEET) $(CSSFONTS)

IMGICON := img/browsericons/icon19-0.png img/browsericons/icon19-1.png \
	   img/browsericons/icon19-2.png img/browsericons/icon19-3.png \
	   img/browsericons/icon19-4.png img/browsericons/icon19-5.png \
	   img/browsericons/icon19-6.png img/browsericons/icon19-7.png \
	   img/browsericons/icon19-8.png img/browsericons/icon19-9.png \
	   img/browsericons/icon19-10.png img/browsericons/icon19-11.png \
	   img/browsericons/icon19-12.png img/browsericons/icon19-13.png \
	   img/browsericons/icon19-14.png img/browsericons/icon19-15.png \
	   img/browsericons/icon19-16.png img/browsericons/icon19-17.png \
	   img/browsericons/icon19-18.png img/browsericons/icon19-19.png \
	   img/browsericons/icon38-off.png img/browsericons/icon19-off.png

IMGOTHER := img/cloud.png img/icon_16.png img/icon_64.png \
	    img/matrix-group-hide.png img/matrix-group-hline.png \
	    img/matrix-group-show.png img/permanent-black-small.png \
	    img/permanent-black-small-cb.png img/permanent-white-small.png \
	    img/permanent-black-small-cb.png

IMG := $(IMGICON) $(IMGOTHER)

LIB := lib/publicsuffixlist.js lib/punycode.js lib/yamd5.js

# Currently support only english
LOCALE := locale/en/messages.properties

# The js folder is split into parts because it's a long list
# and it's somewhat easier to read this way
JS1 := js/about.js js/assets.js js/asset-viewer.js js/background.js \
       js/browsercache.js js/cloud-ui.js js/contentscript.js \
       js/contentscript-start.js js/cookies.js js/dashboard-common.js \
       js/dashboard.js js/hosts-files.js

JS2 := js/httpsb.js js/i18n.js js/liquid-dict.js js/logger.js \
       js/logger-ui.js js/main-blocked.js js/matrix.js js/messaging.js \
       js/pagestats.js js/polyfill.js js/popup.js js/profiler.js \
       js/raw-settings.js js/settings.js js/start.js js/storage.js

# vapi-popup.js is apparently not needed on UXP
# TODO: investigate wether or not it can be removed
JS3 := js/tab.js js/traffic.js js/udom.js js/uritools.js js/user-rules.js \
       js/usersettings.js js/utils.js js/vapi-background.js js/vapi-client.js \
       js/vapi-common.js js/vapi-popup.js js/xal.js

JS := $(JS1) $(JS2) $(JS3)

all: eMatrix.xpi

eMatrix.xpi: $(ROOT) $(ASSETS) $(CSS) $(IMG) $(LIB) $(LOCALE) $(JS)
	@zip -r $@ $^