2006-08-26 23:08:10 +04:00
|
|
|
FASM=fasm
|
2007-04-20 07:21:48 +04:00
|
|
|
FLAGS=-m 65536
|
|
|
|
languages=en|ru|ge|et
|
2010-09-19 18:40:52 +04:00
|
|
|
drivers_src=com_mouse emu10k1x ensoniq fm801 infinity sis sound uart viasound vmode vt823\(x\)
|
2007-04-20 07:21:48 +04:00
|
|
|
skins_src=default
|
2005-10-29 23:25:03 +04:00
|
|
|
|
2007-04-20 07:21:48 +04:00
|
|
|
.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' ..."; \
|
2010-09-19 18:40:52 +04:00
|
|
|
$(FASM) $(FLAGS) "$${f}.asm" "../bin/drivers/$${f}.obj" || exit $?; \
|
2007-04-20 07:21:48 +04:00
|
|
|
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' ..."; \
|
2010-09-19 18:40:52 +04:00
|
|
|
$(FASM) $(FLAGS) $${f}.asm ../bin/skins/$${f}.skn || exit $?; \
|
2007-04-20 07:21:48 +04:00
|
|
|
done
|
|
|
|
|
|
|
|
check_lang:
|
|
|
|
@case "$(lang)" in \
|
|
|
|
$(languages)) \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
echo "*** error: language is incorrect or not specified"; \
|
|
|
|
exit 1; \
|
|
|
|
;; \
|
|
|
|
esac
|
2005-10-29 23:25:03 +04:00
|
|
|
|
|
|
|
clean:
|
2007-04-20 07:21:48 +04:00
|
|
|
rm -rf bin
|
2005-10-29 23:25:03 +04:00
|
|
|
rm -f lang.inc
|