-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
30 lines (20 loc) · 923 Bytes
/
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
ARCH ?= $(shell arch)
guest: .build/linux/guest/arch/$(ARCH)/boot/bzImage .build/initrd.cpio.gz
.PHONY: guest
.build/linux/guest/arch/$(ARCH)/boot/bzImage: .build/linux/guest/.config
$(MAKE) -C lib/linux O=$(CURDIR)/.build/linux/guest bzImage
.build/linux/guest/.config: etc/linux/guest/$(ARCH).config
mkdir -p $(dir $@)
rsync -c $< $@
menuconfig-guest: .build/linux/guest/.config
$(MAKE) -C lib/linux O=$(CURDIR)/.build/linux/guest menuconfig
rsync -c $< etc/linux/guest/$(ARCH).config
.PHONY: menuconfig-guest
.build/initrd.cpio.gz: .build/initrd.iid
docker save $(shell cat $<) | go run ./cmd/docker2cpio | gzip > $@
.build/initrd.iid: etc/initrd/Dockerfile etc/initrd/init.sh
mkdir -p .build; docker build --iidfile $@ etc/initrd
doc/readme.gif: doc/readme.asciicast
agg --no-loop $< $@
doc/readme.asciicast: cmd/readme-example/main.go
asciinema rec --overwrite --cols 90 --rows 30 -c "go run $<" $@