Makefile 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. # Home: https://libregit.org/heckyel/ematrix
  15. # uMatrix Home: https://github.com/gorhill/uMatrix
  16. # To build the XPI we explicitly list every file for these reasons:
  17. # 1) Some editors (like mine) automatically generate a backup file,
  18. # and always removing it before building the archive is bothersome
  19. # (and I don't trust my scripting skills to make it automatic)
  20. # 2) It gives some flexibility in that files can be created or deleted
  21. # freely as long as they are not part of any of these lists
  22. ROOTMETA := bootstrap.js install.rdf chrome.manifest icon.png \
  23. LICENSE.txt options.xul
  24. ROOTHTML := about.html asset-viewer.html background.html \
  25. cloud-ui.html dashboard.html hosts-files.html \
  26. logger-ui.html main-blocked.html popup.html \
  27. raw-settings.html settings.html user-rules.html
  28. ROOTOTHER := frameScript.js frameModule.js
  29. ROOT := $(ROOTMETA) $(ROOTHTML) $(ROOTOTHER)
  30. ASSETS := assets/assets.json
  31. CSSSHEET := css/cloud-ui.css css/common.css css/dashboard-common.css \
  32. css/dashboard.css css/hosts-files.css \
  33. css/legacy-toolbar-button.css css/logger-ui.css \
  34. css/popup.css css/raw-settings.css css/user-rules.css
  35. CSSFONTS := css/fonts/fontawesome-webfont.ttf \
  36. css/fonts/Roboto_Condensed/LICENSE.txt \
  37. css/fonts/Roboto_Condensed/RobotoCondensed-Bold.ttf \
  38. css/fonts/Roboto_Condensed/RobotoCondensed-Light.ttf \
  39. css/fonts/Roboto_Condensed/RobotoCondensed-Regular.ttf
  40. CSS := $(CSSSHEET) $(CSSFONTS)
  41. IMGICON := img/browsericons/icon19-0.png \
  42. img/browsericons/icon19-1.png \
  43. img/browsericons/icon19-2.png \
  44. img/browsericons/icon19-3.png \
  45. img/browsericons/icon19-4.png \
  46. img/browsericons/icon19-5.png \
  47. img/browsericons/icon19-6.png \
  48. img/browsericons/icon19-7.png \
  49. img/browsericons/icon19-8.png \
  50. img/browsericons/icon19-9.png \
  51. img/browsericons/icon19-10.png \
  52. img/browsericons/icon19-11.png \
  53. img/browsericons/icon19-12.png \
  54. img/browsericons/icon19-13.png \
  55. img/browsericons/icon19-14.png \
  56. img/browsericons/icon19-15.png \
  57. img/browsericons/icon19-16.png \
  58. img/browsericons/icon19-17.png \
  59. img/browsericons/icon19-18.png \
  60. img/browsericons/icon19-19.png \
  61. img/browsericons/icon38-off.png \
  62. img/browsericons/icon19-off.png
  63. IMGOTHER := img/cloud.png img/icon_16.png img/icon_64.png \
  64. img/matrix-group-hide.png img/matrix-group-hline.png \
  65. img/matrix-group-show.png img/permanent-black-small.png \
  66. img/permanent-black-small-cb.png \
  67. img/permanent-white-small.png \
  68. img/permanent-black-small-cb.png
  69. IMG := $(IMGICON) $(IMGOTHER)
  70. LIB := lib/publicsuffixlist.js lib/punycode.js lib/yamd5.js
  71. # The locale folder is split into parts because it's a long list
  72. # and it's somewhat easier to read this way
  73. LOC1 := locale/en/messages.properties locale/ar/messages.properties \
  74. locale/bg/messages.properties locale/bn/messages.properties \
  75. locale/cs/messages.properties locale/da/messages.properties \
  76. locale/de/messages.properties locale/el/messages.properties
  77. LOC2 := locale/eo/messages.properties locale/es/messages.properties \
  78. locale/et/messages.properties locale/fa/messages.properties \
  79. locale/fi/messages.properties locale/fil/messages.properties \
  80. locale/fr/messages.properties locale/he/messages.properties
  81. LOC3 := locale/hi/messages.properties locale/hu/messages.properties \
  82. locale/id/messages.properties locale/it/messages.properties \
  83. locale/ja/messages.properties locale/ko/messages.properties \
  84. locale/lv/messages.properties locale/ml/messages.properties
  85. LOC4 := locale/nb/messages.properties locale/nl/messages.properties \
  86. locale/pl/messages.properties \
  87. locale/pt-BR/messages.properties \
  88. locale/pt-PT/messages.properties \
  89. locale/ro/messages.properties locale/ru/messages.properties \
  90. locale/sl/messages.properties
  91. LOC5 := locale/sr/messages.properties locale/sv/messages.properties \
  92. locale/te/messages.properties locale/tr/messages.properties \
  93. locale/uk/messages.properties locale/vi/messages.properties \
  94. locale/zh-CN/messages.properties \
  95. locale/zh-TW/messages.properties
  96. LOCALE := $(LOC1) $(LOC2) $(LOC3) $(LOC4) $(LOC5)
  97. # The js folder is split into parts because it's a long list
  98. # and it's somewhat easier to read this way
  99. JS1 := js/about.js js/assets.js js/asset-viewer.js js/background.js \
  100. js/browsercache.js js/cloud-ui.js js/contentscript.js \
  101. js/contentscript-start.js js/cookies.js js/dashboard-common.js \
  102. js/dashboard.js js/hosts-files.js
  103. JS2 := js/httpsb.js js/i18n.js js/liquid-dict.js js/logger.js \
  104. js/logger-ui.js js/main-blocked.js js/matrix.js \
  105. js/messaging.js js/pagestats.js js/polyfill.js js/popup.js \
  106. js/profiler.js js/raw-settings.js js/settings.js js/start.js \
  107. js/storage.js
  108. JS3 := js/tab.js js/traffic.js js/udom.js js/uritools.js \
  109. js/user-rules.js js/usersettings.js js/utils.js js/xal.js \
  110. CallbackWrapper.jsm HttpRequestHeaders.jsm
  111. JS4 := js/vapi-client.js js/vapi-common.js js/vapi-background.js \
  112. js/vapi-tabs.js js/vapi-window.js js/vapi-core.js \
  113. js/vapi-browser.js js/vapi-storage.js js/vapi-messaging.js \
  114. js/vapi-net.js js/vapi-cookies.js js/vapi-cloud.js
  115. JS := $(JS1) $(JS2) $(JS3) $(JS4)
  116. all: eMatrix.xpi
  117. eMatrix.xpi: $(ROOT) $(ASSETS) $(CSS) $(IMG) $(LIB) $(LOCALE) $(JS)
  118. @zip -r $@ $^
  119. .PHONY: clean
  120. clean:
  121. @rm -f eMatrix.xpi