2021-08-15 16:43:36 +02:00
|
|
|
.PHONY: all clean test lint chromium firefox npm
|
2021-07-31 14:41:28 +02:00
|
|
|
|
|
|
|
sources := $(wildcard src/* src/*/* src/*/*/* src/*/*/*/*)
|
|
|
|
platform := $(wildcard platform/* platform/*/*)
|
|
|
|
assets := $(wildcard submodules/uAssets/* \
|
|
|
|
submodules/uAssets/*/* \
|
|
|
|
submodules/uAssets/*/*/* \
|
|
|
|
submodules/uAssets/*/*/*/*)
|
|
|
|
|
2021-08-15 16:43:36 +02:00
|
|
|
all: chromium firefox npm
|
2021-07-31 14:41:28 +02:00
|
|
|
|
2021-08-03 17:27:55 +02:00
|
|
|
dist/build/uBlock0.chromium: tools/make-chromium.sh $(sources) $(platform) $(assets)
|
2021-07-31 14:41:28 +02:00
|
|
|
tools/make-chromium.sh
|
|
|
|
|
|
|
|
# Build the extension for Chromium.
|
|
|
|
chromium: dist/build/uBlock0.chromium
|
|
|
|
|
2021-08-03 17:27:55 +02:00
|
|
|
dist/build/uBlock0.firefox: tools/make-firefox.sh $(sources) $(platform) $(assets)
|
2021-07-31 14:41:28 +02:00
|
|
|
tools/make-firefox.sh all
|
|
|
|
|
|
|
|
# Build the extension for Firefox.
|
|
|
|
firefox: dist/build/uBlock0.firefox
|
|
|
|
|
2021-08-15 16:43:36 +02:00
|
|
|
dist/build/uBlock0.npm: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
|
|
|
tools/make-npm.sh
|
2021-07-31 14:41:28 +02:00
|
|
|
|
|
|
|
# Build the Node.js package.
|
2021-08-15 16:43:36 +02:00
|
|
|
npm: dist/build/uBlock0.npm
|
2021-07-31 14:41:28 +02:00
|
|
|
|
2021-08-15 16:43:36 +02:00
|
|
|
lint: npm
|
|
|
|
cd dist/build/uBlock0.npm && npm install && npm run lint
|
2021-08-04 20:40:20 +02:00
|
|
|
|
2021-08-15 16:43:36 +02:00
|
|
|
test: npm
|
|
|
|
cd dist/build/uBlock0.npm && npm install && npm run test
|
|
|
|
|
|
|
|
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 && npm run test
|
2021-08-10 19:50:06 +02:00
|
|
|
|
2021-07-31 20:50:31 +02:00
|
|
|
# Update submodules.
|
|
|
|
update-submodules:
|
|
|
|
tools/update-submodules.sh
|
|
|
|
|
2021-07-31 14:41:28 +02:00
|
|
|
clean:
|
|
|
|
rm -rf dist/build
|