projects
/
ld45_start_nothing
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
033d820
)
added rules for constructing hard disk images (better(?) for usb sticks)
master
author
John Tsiombikas
<nuclear@member.fsf.org>
Thu, 17 Oct 2019 07:36:09 +0000
(10:36 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Thu, 17 Oct 2019 07:36:09 +0000
(10:36 +0300)
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
1a2fcb4
..
2055efd
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-11,7
+11,12
@@
LDFLAGS = -m elf_i386 -T game.ld -print-gc-sections
QEMU_FLAGS = -fda floppy.img -serial file:serial.log -d guest_errors
.PHONY: all
QEMU_FLAGS = -fda floppy.img -serial file:serial.log -d guest_errors
.PHONY: all
-all: floppy.img
+all: floppy.img disk.img
+
+disk.img: boot.img blank.img
+ cp blank.img $@
+ dd of=$@ if=$< conv=notrunc
+ dd of=$@ if=blank.img bs=1 seek=440 skip=440 count=70 status=none conv=notrunc
floppy.img: boot.img
dd of=$@ if=/dev/zero bs=512 count=2880
floppy.img: boot.img
dd of=$@ if=/dev/zero bs=512 count=2880
@@
-20,6
+25,10
@@
floppy.img: boot.img
boot.img: bootldr.bin $(bin)
cat $^ >$@
boot.img: bootldr.bin $(bin)
cat $^ >$@
+blank.img: Makefile
+ dd if=/dev/zero of=$@ bs=512 count=8192
+ echo start=2048 type=c | sfdisk $@
+
bootldr.bin: $(elf)
objcopy -O binary -j '.boot*' $< $@
bootldr.bin: $(elf)
objcopy -O binary -j '.boot*' $< $@
@@
-65,7
+74,7
@@
sym: $(name).sym
tools/csprite/csprite:
$(MAKE) -C tools/csprite
tools/csprite/csprite:
$(MAKE) -C tools/csprite
-data/sprsheet.inc: data/sprsheet.png
+data/sprsheet.inc: data/sprsheet.png tools/csprite/csprite
tools/csprite/csprite -n sprsheet -s 32x32 $< >$@
#data/sprsheet.inc: data/sprsheet.png
tools/csprite/csprite -n sprsheet -s 32x32 $< >$@
#data/sprsheet.inc: data/sprsheet.png