Makefile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. # *****************************************************************************
  2. # ηMatrix - a browser extension to black/white list requests.
  3. # Copyright (C) 2019 Alessio Vanni
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program. If not, see {http://www.gnu.org/licenses/}.
  14. # uMatrix Home: https://github.com/gorhill/uMatrix
  15. # To build the XPI we explicitly list every file for these reasons:
  16. # 1) Some editors (like mine) automatically generate a backup file,
  17. # and always removing it before building the archive is bothersome
  18. # (and I don't trust my scripting skills to make it automatic)
  19. # 2) It gives some flexibility in that files can be created or deleted
  20. # freely as long as they are not part of any of these lists
  21. ROOTMETA := bootstrap.js install.rdf chrome.manifest icon.png LICENSE.txt
  22. ROOTHTML := about.html asset-viewer.html background.html cloud-ui.html \
  23. dashboard.html hosts-files.html logger-ui.html \
  24. main-blocked.html popup.html raw-settings.html settings.html \
  25. user-rules.html
  26. ROOTOTHER := frameScript.js frameModule.js
  27. ROOT := $(ROOTMETA) $(ROOTHTML) $(ROOTOTHER)
  28. ASSETS := assets/assets.json
  29. CSSSHEET := css/cloud-ui.css css/common.css css/dashboard-common.css \
  30. css/dashboard.css css/hosts-files.css css/legacy-toolbar-button.css \
  31. css/logger-ui.css css/popup.css css/raw-settings.css \
  32. css/user-rules.css
  33. CSSFONTS := css/fonts/fontawesome-webfont.ttf \
  34. css/fonts/Roboto_Condensed/LICENSE.txt \
  35. css/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf \
  36. css/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf \
  37. css/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf
  38. CSS := $(CSSSHEET) $(CSSFONTS)
  39. IMGICON := img/browsericons/icon19-0.png img/browsericons/icon19-1.png \
  40. img/browsericons/icon19-2.png img/browsericons/icon19-3.png \
  41. img/browsericons/icon19-4.png img/browsericons/icon19-5.png \
  42. img/browsericons/icon19-6.png img/browsericons/icon19-7.png \
  43. img/browsericons/icon19-8.png img/browsericons/icon19-9.png \
  44. img/browsericons/icon19-10.png img/browsericons/icon19-11.png \
  45. img/browsericons/icon19-12.png img/browsericons/icon19-13.png \
  46. img/browsericons/icon19-14.png img/browsericons/icon19-15.png \
  47. img/browsericons/icon19-16.png img/browsericons/icon19-17.png \
  48. img/browsericons/icon19-18.png img/browsericons/icon19-19.png \
  49. img/browsericons/icon38-off.png img/browsericons/icon19-off.png
  50. IMGOTHER := img/cloud.png img/icon_16.png img/icon_64.png \
  51. img/matrix-group-hide.png img/matrix-group-hline.png \
  52. img/matrix-group-show.png img/permanent-black-small.png \
  53. img/permanent-black-small-cb.png img/permanent-white-small.png \
  54. img/permanent-black-small-cb.png
  55. IMG := $(IMGICON) $(IMGOTHER)
  56. LIB := lib/publicsuffixlist.js lib/punycode.js lib/yamd5.js
  57. # The locale folder is split into parts because it's a long list
  58. # and it's somewhat easier to read this way
  59. LOC1 := locale/en/messages.properties locale/ar/messages.properties \
  60. locale/bg/messages.properties locale/bn/messages.properties \
  61. locale/cs/messages.properties locale/da/messages.properties \
  62. locale/de/messages.properties locale/el/messages.properties
  63. LOC2 := locale/eo/messages.properties locale/es/messages.properties \
  64. locale/et/messages.properties locale/fa/messages.properties \
  65. locale/fi/messages.properties locale/fil/messages.properties \
  66. locale/fr/messages.properties locale/he/messages.properties
  67. LOC3 := locale/hi/messages.properties locale/hu/messages.properties \
  68. locale/id/messages.properties locale/it/messages.properties \
  69. locale/ja/messages.properties locale/ko/messages.properties \
  70. locale/lv/messages.properties locale/ml/messages.properties
  71. LOC4 := locale/nb/messages.properties locale/nl/messages.properties \
  72. locale/pl/messages.properties locale/pt-BR/messages.properties \
  73. locale/pt-PT/messages.properties locale/ro/messages.properties \
  74. locale/ru/messages.properties locale/sl/messages.properties
  75. LOC5 := locale/sr/messages.properties locale/sv/messages.properties \
  76. locale/te/messages.properties locale/tr/messages.properties \
  77. locale/uk/messages.properties locale/vi/messages.properties \
  78. locale/zh-CN/messages.properties locale/zh-TW/messages.properties
  79. LOCALE := $(LOC1) $(LOC2) $(LOC3) $(LOC4) $(LOC5)
  80. # The js folder is split into parts because it's a long list
  81. # and it's somewhat easier to read this way
  82. JS1 := js/about.js js/assets.js js/asset-viewer.js js/background.js \
  83. js/browsercache.js js/cloud-ui.js js/contentscript.js \
  84. js/contentscript-start.js js/cookies.js js/dashboard-common.js \
  85. js/dashboard.js js/hosts-files.js
  86. JS2 := js/httpsb.js js/i18n.js js/liquid-dict.js js/logger.js \
  87. js/logger-ui.js js/main-blocked.js js/matrix.js js/messaging.js \
  88. js/pagestats.js js/polyfill.js js/popup.js js/profiler.js \
  89. js/raw-settings.js js/settings.js js/start.js js/storage.js
  90. # vapi-popup.js is apparently not needed on UXP
  91. # TODO: investigate wether or not it can be removed
  92. JS3 := js/tab.js js/traffic.js js/udom.js js/uritools.js js/user-rules.js \
  93. js/usersettings.js js/utils.js js/vapi-background.js js/vapi-client.js \
  94. js/vapi-common.js js/vapi-popup.js js/xal.js
  95. JS := $(JS1) $(JS2) $(JS3)
  96. all: eMatrix.xpi
  97. eMatrix.xpi: $(ROOT) $(ASSETS) $(CSS) $(IMG) $(LIB) $(LOCALE) $(JS)
  98. @zip -r $@ $^