#
# french : Makefile permettant de compiler v2os
# Makefile to create v2os file and install 
# it on a floppy disk
#

boot_src=boot/boot.asm

system16_src=system16/gdt.inc system16/s16struc.asm system16/s16struc.inc \
        system16/system16.asm system16/v2osfont.inc \
	system16/sysrout/s16funcs.inc system16/sysrout/sr00.inc \
	system16/sysrout/sr01.inc system16/sysrout/sr02.inc \
	system16/sysrout/sr03.inc system16/sysrout/sr04.inc \
	system16/sysrout/sr05.inc

system32_src=system32/system32.asm

all: boot.v2s system16.v2s system32.v2s

boot.v2s: $(boot_src)
	nasm -f bin -o boot.v2s boot/boot.asm

system16.v2s: $(system16_src)
	nasm -f bin -isystem16/ -o system16.v2s system16/system16.asm

system32.v2s: $(system32_src)
	nasm -f bin -isystem32/ -o system32.v2s system32/system32.asm

clean:
	rm -f *.v2s *~ v2os.img
	find . -name "*~" -exec rm {} \;

install: boot.v2s system16.v2s system32.v2s
	sh install.sh
