From 2c7f83e006c3fee8d26e940eee801a4be9443e50 Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 18 Apr 2005 15:18:02 +0000 Subject: Verzeichnisstruktur ver?ndert --- Makefile | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6cecf3e --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +VERSION = 0.01 pre-alpha + + +KERNEL_FILES = boot/boot.o system/system.o driver/driver.o + +SPECIAL_FILES = include/asm/version.h + + +kernel : version WINX + @echo + @echo WINX $(VERSION) compiled + @echo + +WINX : Makefile $(KERNEL_FILES) + @echo + @echo Linking kernel... + @ld -Ttext 0x0 -entry start -s --oformat binary -o WINX $(KERNEL_FILES) + +floppy : WINX + @echo + @echo Insert a blank 1.44 Mb floppy into drive 0 + @echo "Press to continue, <^C> to abort..." + @read + @dd if=WINX of=/dev/fd0 bs=512 + @echo + @echo Done. + @echo + +clean : + @echo + @echo Cleanup... + @rm -f $(KERNEL_FILES) $(SPECIAL_FILES) $(BOOT_FILES) $(SYSTEM_FILES) $(DRIVER_FILES) + @echo OK + @echo + + +%.o : %.S + @echo Compiling $< + @cpp $< -I include | as -o $*.o + +%.o : %.c + @echo Compiling $< + @gcc -I include -c -O3 -fno-zero-initialized-in-bss -o $*.o $< + + +version : include/asm/version.h + @if ([ '$(shell cat "include/asm/version.h")' != '#define WINX_VERSION "$(VERSION)"' ]) then \ + echo "#define WINX_VERSION \"$(VERSION)\"" > include/asm/version.h; fi + +include/asm/version.h: + @touch "include/asm/version.h" + +include boot/Makefile +include system/Makefile +include driver/Makefile -- cgit v1.2.3