aboutsummaryrefslogtreecommitdiff
path: root/2/makefile
blob: 06c25520430719205c0dab92dd89e68fbe69bc58 (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
# see ./rice.sh
RELEASE = 6.6.15-ti-rt-arm32-r1
DEB_URL = https://repos.rcn-ee.com/debian/pool/main/l/linux-upstream/linux-headers-$(RELEASE)_1sid_armhf.deb

.PHONY: FORCE

kernel-headers.deb:
	curl -sLo- $(DEB_URL) > $@

data.tar.xz: kernel-headers.deb
	ar x $< $@

headers: data.tar.xz
	mkdir -p $@
	tar xf $< -C $@ --strip-components 4 ./usr/src/linux-headers-$(RELEASE)

CTR := podman
# CTR := sudo podman # rootless not set up or unsupported
CTR_IMG_TAG := avans-drvo

CTRIZE := $(CTR) run
CTRIZE += --rm
CTRIZE += --tty
CTRIZE += --volume /tmp:/tmp:rw
CTRIZE += --volume .:/workdir:rw
# CTRIZE += --env-file ./env
CTRIZE += --env MAKE*
CTRIZE += $(CTR_IMG_TAG)
export

container: FORCE
	$(CTR) build --tag $(CTR_IMG_TAG) .

build_test: FORCE
	$(CTRIZE) $(MAKE) -C module