This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
forked from radxa-pkg/radxa-overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (49 loc) · 1.57 KB
/
Makefile
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
KERNELRELEASE ?= $(shell uname -r)
KSRC ?= /lib/modules/$(KERNELRELEASE)/build
CONFIG_CLK_RK3308 ?= rockchip
CONFIG_CLK_RK3328 ?= rockchip
CONFIG_CLK_RK3399 ?= rockchip
CONFIG_CLK_RK3568 ?= rockchip
CONFIG_CLK_RK3588 ?= rockchip
CONFIG_ARCH_MESON ?= amlogic
include $(wildcard arch/arm64/boot/dts/*/overlays/Makefile)
DTBO-AMLOGIC := $(addprefix arch/arm64/boot/dts/amlogic/overlays/,$(dtb-amlogic))
DTBO-ROCKCHIP := $(addprefix arch/arm64/boot/dts/rockchip/overlays/,$(dtb-rockchip))
DTBO := $(DTBO-AMLOGIC) $(DTBO-ROCKCHIP)
TMP := $(addsuffix .tmp,$(DTBO))
#
# Build
#
.PHONY: build
build: build-doc
.PHONY: build-dtbo
build-dtbo: $(DTBO)
%.dtbo: %.dts
cpp -nostdinc -undef -x assembler-with-cpp -E -I "$(KSRC)/include" "$<" "[email protected]"
dtc -q -@ -I dts -O dtb -o "$@" "[email protected]"
DOCS := SOURCE
.PHONY: build-doc
build-doc: $(DOCS)
.PHONY: SOURCE
SOURCE:
echo -e "git clone $(shell git remote get-url origin)\ngit checkout $(shell git rev-parse HEAD)" > "$@"
#
# Clean
#
.PHONY: distclean
distclean: clean
.PHONY: clean-dtbo
clean-dtbo:
rm -rf $(DTBO) $(TMP)
.PHONY: clean
clean: clean-dtbo
rm -rf debian/.debhelper debian/radxa-overlays-dkms debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.*.debhelper debian/*.substvars debian/tmp
#
# Release
#
.PHONY: dch
dch: debian/changelog build-doc
EDITOR=true gbp dch --commit --debian-branch=main --release --dch-opt=--upstream
.PHONY: deb
deb: debian build-doc
debuild --no-lintian --lintian-hook "lintian --fail-on error,warning --suppress-tags bad-distribution-in-changes-file -- %p_%v_*.changes" --no-sign -b