2021-08-10 11:50:06 -06:00
|
|
|
.PHONY: all clean test lint chromium firefox nodejs
|
2021-07-31 06:41:28 -06:00
|
|
|
|
|
|
|
sources := $(wildcard src/* src/*/* src/*/*/* src/*/*/*/*)
|
|
|
|
platform := $(wildcard platform/* platform/*/*)
|
|
|
|
assets := $(wildcard submodules/uAssets/* \
|
|
|
|
submodules/uAssets/*/* \
|
|
|
|
submodules/uAssets/*/*/* \
|
|
|
|
submodules/uAssets/*/*/*/*)
|
|
|
|
|
|
|
|
all: chromium firefox nodejs
|
|
|
|
|
2021-08-03 09:27:55 -06:00
|
|
|
dist/build/uBlock0.chromium: tools/make-chromium.sh $(sources) $(platform) $(assets)
|
2021-07-31 06:41:28 -06:00
|
|
|
tools/make-chromium.sh
|
|
|
|
|
|
|
|
# Build the extension for Chromium.
|
|
|
|
chromium: dist/build/uBlock0.chromium
|
|
|
|
|
2021-08-03 09:27:55 -06:00
|
|
|
dist/build/uBlock0.firefox: tools/make-firefox.sh $(sources) $(platform) $(assets)
|
2021-07-31 06:41:28 -06:00
|
|
|
tools/make-firefox.sh all
|
|
|
|
|
|
|
|
# Build the extension for Firefox.
|
|
|
|
firefox: dist/build/uBlock0.firefox
|
|
|
|
|
2021-08-03 09:27:55 -06:00
|
|
|
dist/build/uBlock0.nodejs: tools/make-nodejs.sh $(sources) $(platform) $(assets)
|
2021-07-31 06:41:28 -06:00
|
|
|
tools/make-nodejs.sh
|
|
|
|
|
|
|
|
# Build the Node.js package.
|
|
|
|
nodejs: dist/build/uBlock0.nodejs
|
|
|
|
|
2021-08-04 12:40:20 -06:00
|
|
|
lint: nodejs
|
2021-08-13 04:43:20 -06:00
|
|
|
cd dist/build/uBlock0.nodejs && npm install && npm run lint
|
2021-08-04 12:40:20 -06:00
|
|
|
|
2021-08-10 11:50:06 -06:00
|
|
|
test: nodejs
|
2021-08-13 04:43:20 -06:00
|
|
|
cd dist/build/uBlock0.nodejs && npm install && npm run test
|
2021-08-10 11:50:06 -06:00
|
|
|
|
2021-07-31 12:50:31 -06:00
|
|
|
# Update submodules.
|
|
|
|
update-submodules:
|
|
|
|
tools/update-submodules.sh
|
|
|
|
|
2021-07-31 06:41:28 -06:00
|
|
|
clean:
|
|
|
|
rm -rf dist/build
|