Subversion Repositories Kolibri OS

Rev

Rev 3555 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5201 serge 1
FASM=fasm
2
FLAGS=-m 65536
3
languages=en|ru|ge|et|sp
4
 
5
.PHONY: all kernel bootloader clean
6
 
7
all: kernel bootloader
8
 
9
kernel: check_lang
10
	@echo "*** building kernel with language '$(lang)' ..."
11
	@mkdir -p bin
12
	@echo "lang fix $(lang)" > lang.inc
13
	@echo "--- building 'bin/kernel.mnt' ..."
14
	@$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt
15
	@rm -f lang.inc
16
 
17
bootloader: check_lang
18
	@echo "*** building bootloader with language '$(lang)' ..."
19
	@mkdir -p bin
20
	@echo "lang fix $(lang)" > lang.inc
21
	@echo "--- building 'bin/boot_fat12.bin' ..."
22
	@$(FASM) $(FLAGS) bootloader/boot_fat12.asm bin/boot_fat12.bin
23
	@rm -f lang.inc
24
 
25
 
26
check_lang:
27
	@case "$(lang)" in \
28
	  $(languages)) \
29
	    ;; \
30
	  *) \
31
	    echo "*** error: language is incorrect or not specified"; \
32
	    exit 1; \
33
	    ;; \
34
	esac
35
 
36
clean:
37
	rm -rf bin
38
	rm -f lang.inc