Blame view

Makefile 798 Bytes
Imanol-Mikel Barba Sabariego authored
1
TARGETS = boot_floppy.bin boot_usb.bin second_binary.bin
Imanol-Mikel Barba Sabariego authored
2
3
Imanol-Mikel Barba Sabariego authored
4
boot_floppy.bin: boot_floppy.asm floppy.img
Imanol-Mikel Barba Sabariego authored
5
	nasm boot_floppy.asm -f bin -o boot_floppy.bin; \
Imanol-Mikel Barba Sabariego authored
6
7
	dd if=boot_floppy.bin of=floppy.img bs=512 count=1 conv=notrunc
Imanol-Mikel Barba Sabariego authored
8
boot_usb.bin: boot_usb.asm usb.img
Imanol-Mikel Barba Sabariego authored
9
	nasm boot_usb.asm -f bin -o boot_usb.bin; \
Imanol-Mikel Barba Sabariego authored
10
11
12
        dd if=boot_usb.bin of=usb.img bs=512 count=1 conv=notrunc

second_binary.bin: second_binary.asm floppy.img usb.img
Imanol-Mikel Barba Sabariego authored
13
14
	nasm second_binary.asm -f bin -o second_binary.bin; \
	dd if=second_binary.bin of=floppy.img bs=512 count=1 seek=3 conv=notrunc; \
Imanol-Mikel Barba Sabariego authored
15
16
        dd if=second_binary.bin of=usb.img bs=512 count=1 seek=3 conv=notrunc
Imanol-Mikel Barba Sabariego authored
17
18
19
floppy.img: 
	dd if=/dev/zero of=floppy.img bs=512 count=2880
Imanol-Mikel Barba Sabariego authored
20
21
22
usb.img:
	dd if=/dev/zero of=usb.img bs=512 count=2880
Imanol-Mikel Barba Sabariego authored
23
24
25
26
27
clean:
	rm -rf $(TARGETS)

all: $(TARGETS)