diff options
-rw-r--r-- | Makefile | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b848d85 --- /dev/null +++ b/Makefile @@ -0,0 +1,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 $@ $^ |