Subversion Repositories Kolibri OS

Rev

Rev 1161 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. FASM=fasm
  2. FLAGS=-m 65536
  3. languages=en|ru|ge|et
  4. drivers_src=sound sis infinity uart ati2d vmode com_mouse
  5. skins_src=default
  6.  
  7. .PHONY: all kernel drivers skins clean
  8.  
  9. all: kernel drivers skins
  10.  
  11. kernel: check_lang
  12.         @echo "*** building kernel with language '$(lang)' ..."
  13.         @mkdir -p bin
  14.         @echo "lang fix $(lang)" > lang.inc
  15.         @echo "--- building 'bin/kernel.mnt' ..."
  16.         @$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt
  17.         @rm -f lang.inc
  18.  
  19. drivers:
  20.         @echo "*** building drivers ..."
  21.         @mkdir -p bin/drivers
  22.         @cd drivers; for f in $(drivers_src); do \
  23.           echo "--- building 'bin/drivers/$${f}.obj' ..."; \
  24.           $(FASM) $(FLAGS) $${f}.asm ../bin/drivers/$${f}.obj; \
  25.         done
  26.         @mv bin/drivers/vmode.obj bin/drivers/vmode.mdr
  27.  
  28. skins:
  29.         @echo "*** building skins ..."
  30.         @mkdir -p bin/skins
  31.         @cd skin; for f in $(skins_src); do \
  32.           echo "--- building 'bin/skins/$${f}.skn' ..."; \
  33.           $(FASM) $(FLAGS) $${f}.asm ../bin/skins/$${f}.skn; \
  34.         done
  35.  
  36. check_lang:
  37.         @case "$(lang)" in \
  38.           $(languages)) \
  39.             ;; \
  40.           *) \
  41.             echo "*** error: language is incorrect or not specified"; \
  42.             exit 1; \
  43.             ;; \
  44.         esac
  45.  
  46. clean:
  47.         rm -rf bin
  48.         rm -f lang.inc
  49.