2006-08-26 21:08:10 +02:00
|
|
|
FASM=fasm
|
2007-04-20 05:21:48 +02:00
|
|
|
FLAGS=-m 65536
|
2013-02-26 19:29:14 +01:00
|
|
|
languages=en|ru|ge|et|sp
|
|
|
|
drivers_src=com_mouse emu10k1x fm801 infinity sis sound vt823x
|
2005-10-29 21:25:03 +02:00
|
|
|
|
2013-02-26 19:29:14 +01:00
|
|
|
.PHONY: all kernel drivers bootloader clean
|
2007-04-20 05:21:48 +02:00
|
|
|
|
2013-02-26 19:29:14 +01:00
|
|
|
all: kernel drivers bootloader
|
2007-04-20 05:21:48 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
drivers:
|
|
|
|
@echo "*** building drivers ..."
|
|
|
|
@mkdir -p bin/drivers
|
|
|
|
@cd drivers; for f in $(drivers_src); do \
|
|
|
|
echo "--- building 'bin/drivers/$${f}.obj' ..."; \
|
2010-09-19 16:40:52 +02:00
|
|
|
$(FASM) $(FLAGS) "$${f}.asm" "../bin/drivers/$${f}.obj" || exit $?; \
|
2007-04-20 05:21:48 +02:00
|
|
|
done
|
|
|
|
|
2013-02-26 19:29:14 +01:00
|
|
|
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
|
|
|
|
|
2007-04-20 05:21:48 +02:00
|
|
|
|
|
|
|
check_lang:
|
|
|
|
@case "$(lang)" in \
|
|
|
|
$(languages)) \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
echo "*** error: language is incorrect or not specified"; \
|
|
|
|
exit 1; \
|
|
|
|
;; \
|
|
|
|
esac
|
2005-10-29 21:25:03 +02:00
|
|
|
|
|
|
|
clean:
|
2007-04-20 05:21:48 +02:00
|
|
|
rm -rf bin
|
2005-10-29 21:25:03 +02:00
|
|
|
rm -f lang.inc
|