diff options
author | neoraider <devnull@localhost> | 2005-04-18 17:18:02 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2005-04-18 17:18:02 +0200 |
commit | 2c7f83e006c3fee8d26e940eee801a4be9443e50 (patch) | |
tree | cb8273f74857305921b653aed0a0488b2d27c13a /Makefile | |
download | winx-2c7f83e006c3fee8d26e940eee801a4be9443e50.tar winx-2c7f83e006c3fee8d26e940eee801a4be9443e50.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
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 <Enter> 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 |