| 1 |
|
| 2 |
|
| 3 |
FIRMWAREDIR = /lib/firmware |
| 4 |
NUM_JOBS := $(or $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))),\ |
| 5 |
1) |
| 6 |
|
| 7 |
all: |
| 8 |
|
| 9 |
check: |
| 10 |
@if ! command -v pre-commit >/dev/null; then \ |
| 11 |
echo "Install pre-commit to check files"; \ |
| 12 |
exit 1; \ |
| 13 |
fi |
| 14 |
@pre-commit run --all-files |
| 15 |
|
| 16 |
dist: |
| 17 |
@mkdir -p release dist |
| 18 |
./copy-firmware.sh release |
| 19 |
@TARGET=linux-firmware_`git describe`.tar.gz; \ |
| 20 |
cd release && tar -czf ../dist/$${TARGET} *; \ |
| 21 |
echo "Created dist/$${TARGET}" |
| 22 |
@rm -rf release |
| 23 |
|
| 24 |
deb: |
| 25 |
./build_packages.py --deb |
| 26 |
|
| 27 |
rpm: |
| 28 |
./build_packages.py --rpm |
| 29 |
|
| 30 |
dedup: |
| 31 |
./dedup-firmware.sh $(DESTDIR)$(FIRMWAREDIR) |
| 32 |
|
| 33 |
install: |
| 34 |
@if [ -n "${COPYOPTS}" ]; then \ |
| 35 |
echo "COPYOPTS is not used since linux-firmware-20241017!"; \ |
| 36 |
echo "You may want to use install{-xz,-zst} and dedup targets instead"; \ |
| 37 |
false; \ |
| 38 |
fi |
| 39 |
install -d $(DESTDIR)$(FIRMWAREDIR) |
| 40 |
./copy-firmware.sh -j$(NUM_JOBS) $(DESTDIR)$(FIRMWAREDIR) |
| 41 |
@echo "Now run \"make dedup\" to de-duplicate any firmware files" |
| 42 |
|
| 43 |
install-xz: |
| 44 |
install -d $(DESTDIR)$(FIRMWAREDIR) |
| 45 |
./copy-firmware.sh -j$(NUM_JOBS) --xz $(DESTDIR)$(FIRMWAREDIR) |
| 46 |
@echo "Now run \"make dedup\" to de-duplicate any firmware files" |
| 47 |
|
| 48 |
install-zst: |
| 49 |
install -d $(DESTDIR)$(FIRMWAREDIR) |
| 50 |
./copy-firmware.sh -j$(NUM_JOBS) --zstd $(DESTDIR)$(FIRMWAREDIR) |
| 51 |
@echo "Now run \"make dedup\" to de-duplicate any firmware files" |
| 52 |
|
| 53 |
clean: |
| 54 |
rm -rf release dist |