#
# Copyright (C) 2004-2009 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

all: bootfloppy

bootfloppy: bootsect
	dd if=/dev/zero of=/tmp/blocks bs=512 count=2879
	cat bootsect /tmp/blocks > bootfloppy
	rm /tmp/blocks
clean distclean::
	rm -f bootfloppy

bootsect: bootsect.o
	$(LD) -Ttext 0x0 -s --oformat binary -o $@ $<
clean distclean::
	rm -f bootsect

bootsect.o: bootsect.s
	$(AS) -o $@ $<
clean distclean::
	rm -f bootsect.o

bootsect.s: bootsect.S Makefile
	$(CPP) -traditional $< -o $@
clean distclean::
	rm -f bootsect.s
