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
37 all: $(worktree)/card.img
39 image: $(worktree)/card.img
41 firmware: $(worktree)/card.img
46 burn: $(worktree)/card.img
48 script/burn $(.ALLSRC) $(dev)
50 $(worktree)/card.img: $(worktree)/boot.img $(worktree)/root.img
52 ${gencard} -b $(worktree)/boot.img -r $(worktree)/root.img -c $(worktree)/conf -o $(worktree)/card.img
53 @printf " \033[1;32m*\033[0m Complete\n"
55 $(worktree)/boot.img: $(worktree)/boot
57 ${genufs} -p $(boot_pad) -l boot -o $(worktree)/boot.img $(worktree)/boot
59 $(worktree)/root.img: $(worktree)/root.iso
62 ${genuzip} $(.ALLSRC) $(.TARGET)
64 $(worktree)/root.iso: $(worktree)/root
67 ${geniso} -n root $(.ALLSRC) $(.TARGET)
69 $(worktree): $(worktree)/root
71 $(worktree)/boot: $(srctree)/root
73 $(gentree) -b $(srctree) -t $(worktree) -r $(.ALLSRC)
75 $(worktree)/root: $(srctree)/root
77 $(gentree) -b $(srctree) -t $(worktree) -r $(.ALLSRC)