Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
137 mikedld 1
FASM=fasm
467 mikedld 2
FLAGS=-m 65536
3274 esevece 3
languages=en|ru|ge|et|sp
17 me_root 4
 
5084 clevermous 5
.PHONY: all kernel bootloader clean
17 me_root 6
 
7129 dunkaist 7
all: kernel bootloader bootbios
467 mikedld 8
 
7129 dunkaist 9
kernel: check_lang bootbios
467 mikedld 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
7129 dunkaist 15
	@$(FASM) $(FLAGS) -dUEFI=1 kernel.asm bin/kernel.bin
467 mikedld 16
	@rm -f lang.inc
17
 
7129 dunkaist 18
bootbios: check_lang
19
	@echo "*** building bootbios.bin with language '$(lang)' ..."
20
	@mkdir -p bin
21
	@echo "lang fix $(lang)" > lang.inc
22
	@echo "--- building 'bootbios.bin' ..."
23
	@$(FASM) $(FLAGS) bootbios.asm bootbios.bin
24
	@rm -f lang.inc
25
 
3274 esevece 26
bootloader: check_lang
27
	@echo "*** building bootloader with language '$(lang)' ..."
28
	@mkdir -p bin
29
	@echo "lang fix $(lang)" > lang.inc
30
	@echo "--- building 'bin/boot_fat12.bin' ..."
31
	@$(FASM) $(FLAGS) bootloader/boot_fat12.asm bin/boot_fat12.bin
32
	@rm -f lang.inc
33
 
467 mikedld 34
 
35
check_lang:
36
	@case "$(lang)" in \
37
	  $(languages)) \
38
	    ;; \
39
	  *) \
40
	    echo "*** error: language is incorrect or not specified"; \
41
	    exit 1; \
42
	    ;; \
43
	esac
44
 
17 me_root 45
clean:
467 mikedld 46
	rm -rf bin
17 me_root 47
	rm -f lang.inc