diff --git a/kernel/trunk/Makefile b/kernel/trunk/Makefile new file mode 100644 index 0000000000..89f66d1bb9 --- /dev/null +++ b/kernel/trunk/Makefile @@ -0,0 +1,38 @@ +FASM=fasm +FLAGS=-m 65536 +languages=en|ru|ge|et|sp + +.PHONY: all kernel bootloader clean + +all: kernel bootloader + +kernel: check_lang + @echo "*** building kernel with language '$(lang)' ..." + @mkdir -p bin + @echo "lang fix $(lang)" > lang.inc + @echo "--- building 'bin/kernel.mnt' ..." + @$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt + @rm -f lang.inc + +bootloader: check_lang + @echo "*** building bootloader with language '$(lang)' ..." + @mkdir -p bin + @echo "lang fix $(lang)" > lang.inc + @echo "--- building 'bin/boot_fat12.bin' ..." + @$(FASM) $(FLAGS) bootloader/boot_fat12.asm bin/boot_fat12.bin + @rm -f lang.inc + + +check_lang: + @case "$(lang)" in \ + $(languages)) \ + ;; \ + *) \ + echo "*** error: language is incorrect or not specified"; \ + exit 1; \ + ;; \ + esac + +clean: + rm -rf bin + rm -f lang.inc diff --git a/kernel/trunk/makefile b/kernel/trunk/makefile deleted file mode 100644 index c753058df6..0000000000 --- a/kernel/trunk/makefile +++ /dev/null @@ -1,38 +0,0 @@ -FASM=fasm -FLAGS=-m 65536 -languages=en|ru|ge|et|sp - -.PHONY: all kernel bootloader clean - -all: kernel bootloader - -kernel: check_lang - @echo "*** building kernel with language '$(lang)' ..." - @mkdir -p bin - @echo "lang fix $(lang)" > lang.inc - @echo "--- building 'bin/kernel.mnt' ..." - @$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt - @rm -f lang.inc - -bootloader: check_lang - @echo "*** building bootloader with language '$(lang)' ..." - @mkdir -p bin - @echo "lang fix $(lang)" > lang.inc - @echo "--- building 'bin/boot_fat12.bin' ..." - @$(FASM) $(FLAGS) bootloader/boot_fat12.asm bin/boot_fat12.bin - @rm -f lang.inc - - -check_lang: - @case "$(lang)" in \ - $(languages)) \ - ;; \ - *) \ - echo "*** error: language is incorrect or not specified"; \ - exit 1; \ - ;; \ - esac - -clean: - rm -rf bin - rm -f lang.inc