4 # -o output to root.iso
5 # -D No deep directory relocation (and no RR_MOVED)
6 # -no-pad Don't pad to 150 sectors
17 gentree = script/gentree
18 genufs = script/genufs
19 geniso = script/geniso
20 genuzip = script/genuzip
21 gencard = script/gencard
24 mkuzip != which mkuzip
25 mkuzip_opts ?= -s 65536
26 mkisofs != which mkisofs
27 mkisofs_opts?= -quiet -D -R -no-pad -p CyberLeo
29 # Default device for burn target
34 checkroot = @if [ $(curruser) -gt 0 ]; then printf "\033[1;31mI need root\033[0m\n"; exit 1; fi
35 checkdeps = @if [ ! -x "$(mkisofs)" -o ! -x "$(mkuzip)" ]; then printf "\033[1;31mCheck depends! mkisofs: $(mkisofs) mkuzip: $(mkuzip)\033[0m\n"; exit 1; fi
38 all: $(worktree)/card.img
40 image: $(worktree)/card.img
42 firmware: $(worktree)/card.img
44 # Check that we're running as root
49 burn: $(worktree)/card.img
51 script/burn $(.ALLSRC) $(dev)
53 # Push to build target
58 $(worktree)/card.img: $(worktree)/boot.img $(worktree)/root.img
60 ${gencard} -b $(worktree)/boot.img -r $(worktree)/root.img -c $(worktree)/conf -o $(worktree)/card.img
61 @printf " \033[1;32m*\033[0m Complete\n"
63 $(worktree)/boot.img: $(worktree)/boot
65 ${genufs} -p $(boot_pad) -l boot -o $(worktree)/boot.img $(worktree)/boot
67 $(worktree)/root.img: $(worktree)/root.iso
70 ${genuzip} $(.ALLSRC) $(.TARGET)
72 $(worktree)/root.iso: $(worktree)/root
75 ${geniso} -n root $(.ALLSRC) $(.TARGET)
77 $(worktree): $(worktree)/root
79 $(worktree)/boot: $(srctree)/root
81 $(gentree) -b $(srctree) -t $(worktree)
83 $(worktree)/root: $(srctree)/root
85 $(gentree) -b $(srctree) -t $(worktree)
87 # Scrub everything clean