summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ac43c97fbd0a35b610c4d21c2bf8e8cf21864c9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This file implements the GNOME Build API:
# http://people.gnome.org/~walters/docs/build-api.txt

FIRMWAREDIR = /lib/firmware

all:

check:
	@if ! command -v pre-commit >/dev/null; then \
		echo "Install pre-commit to check files"; \
		exit 1; \
	fi
	@pre-commit run --all-files

dist:
	@mkdir -p release dist
	./copy-firmware.sh release
	@TARGET=linux-firmware_`git describe`.tar.gz; \
	cd release && tar -czf ../dist/$${TARGET} *; \
	echo "Created dist/$${TARGET}"
	@rm -rf release

deb:
	./build_packages.py --deb

rpm:
	./build_packages.py --rpm

install:
	install -d $(DESTDIR)$(FIRMWAREDIR)
	./copy-firmware.sh $(COPYOPTS) $(DESTDIR)$(FIRMWAREDIR)

install-nodedup:
	install -d $(DESTDIR)$(FIRMWAREDIR)
	./copy-firmware.sh --ignore-duplicates $(DESTDIR)$(FIRMWAREDIR)

install-xz:
	install -d $(DESTDIR)$(FIRMWAREDIR)
	./copy-firmware.sh --xz $(DESTDIR)$(FIRMWAREDIR)

install-zst:
	install -d $(DESTDIR)$(FIRMWAREDIR)
	./copy-firmware.sh --zstd $(DESTDIR)$(FIRMWAREDIR)

clean:
	rm -rf release dist