3 Commits

Author SHA1 Message Date
aef0b3a6a7 Return four space indents in kermel Makefile
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m31s
Build system / Build (pull_request) Successful in 12m22s
2025-06-13 18:19:10 +02:00
6181afd33d Updated kernel Makefile
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m40s
Build system / Build (pull_request) Successful in 11m51s
TBH it worked even without this but okay.
2025-06-13 18:04:59 +02:00
c112873dbd Fixed kernel's Makefile by removing bootbios target
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m7s
Build system / Build (pull_request) Successful in 12m30s
2025-06-13 12:32:32 +02:00

View File

@@ -1,47 +1,39 @@
FASM=fasm
FLAGS=-m 65536
FLAGS=-m 262144
languages=en_US|ru_RU|de_DE|et_EE|es_ES
.PHONY: all kernel bootloader clean
all: kernel bootloader bootbios
all: kernel bootloader
kernel: check_lang bootbios
@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
@$(FASM) $(FLAGS) -dUEFI=1 kernel.asm bin/kernel.bin
@rm -f lang.inc
bootbios: check_lang
@echo "*** building bootbios.bin with language '$(lang)' ..."
@mkdir -p bin
@echo "lang fix $(lang)" > lang.inc
@echo "--- building 'bootbios.bin' ..."
@$(FASM) $(FLAGS) bootbios.asm bootbios.bin
@rm -f lang.inc
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
@$(FASM) $(FLAGS) kernel.asm -dextended_primary_loader=1 bin/kernel.bin
@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
@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
@case "$(lang)" in \
$(languages)) \
;; \
*) \
echo "*** error: language is incorrect or not specified"; \
exit 1; \
;; \
esac
clean:
rm -rf bin
rm -f lang.inc
rm -rf bin
rm -f lang.inc