2009-09-17 15:55:38 +04:00
|
|
|
FASM=fasm
|
|
|
|
FLAGS=-m 65536
|
|
|
|
languages=en|ru|ge|et
|
2009-10-07 13:59:35 +04:00
|
|
|
drivers_src=sound sis infinity uart ati2d vmode com_mouse
|
2009-09-17 15:55:38 +04:00
|
|
|
skins_src=default
|
|
|
|
|
|
|
|
.PHONY: all kernel drivers skins clean
|
|
|
|
|
|
|
|
all: kernel drivers skins
|
|
|
|
|
|
|
|
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' ..."; \
|
|
|
|
$(FASM) $(FLAGS) $${f}.asm ../bin/drivers/$${f}.obj; \
|
|
|
|
done
|
|
|
|
@mv bin/drivers/vmode.obj bin/drivers/vmode.mdr
|
|
|
|
|
|
|
|
skins:
|
|
|
|
@echo "*** building skins ..."
|
|
|
|
@mkdir -p bin/skins
|
|
|
|
@cd skin; for f in $(skins_src); do \
|
|
|
|
echo "--- building 'bin/skins/$${f}.skn' ..."; \
|
|
|
|
$(FASM) $(FLAGS) $${f}.asm ../bin/skins/$${f}.skn; \
|
|
|
|
done
|
|
|
|
|
|
|
|
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
|