1 | |
---|
2 | #put your absolute path to almos-mkh dir here |
---|
3 | ALMOS-MKH_DIR = /Users/alain/soc/almos-mkh |
---|
4 | |
---|
5 | LIBC_NAME = mini-libc |
---|
6 | #LIBC_NAME = newlib |
---|
7 | |
---|
8 | ARCH_NAME = tsar_mips32 |
---|
9 | #ARCH_NAME = x86_64 |
---|
10 | |
---|
11 | LIBPTHREAD_NAME = mini-libpthread |
---|
12 | |
---|
13 | ifeq ($(ALMOS-MKH_DIR),) |
---|
14 | $(error Please define ALMOS-MKH_DIR parameter in params-soft.mk!) |
---|
15 | endif |
---|
16 | |
---|
17 | |
---|
18 | ifeq ($(LIBC_NAME), mini-libc) |
---|
19 | LIBC_PATH = $(ALMOS-MKH_DIR)/libs/mini-libc/ |
---|
20 | endif |
---|
21 | ifeq ($(LIBC_NAME), newlib) |
---|
22 | LIBC_PATH = $(ALMOS-MKH_DIR)/libs/newlib/ |
---|
23 | endif |
---|
24 | |
---|
25 | ifeq ($(LIBPTHREAD_NAME), mini-libpthread) |
---|
26 | LIBPTHREAD_PATH = $(ALMOS-MKH_DIR)/libs/mini-libpthread/ |
---|
27 | endif |
---|
28 | |
---|
29 | #Define path to .a and headers files for libc and libpthread |
---|
30 | LIBC = $(LIBC_PATH)/build/lib/ |
---|
31 | LIBC_INCLUDE = $(LIBC_PATH)/build/include/ |
---|
32 | LIBPTHREAD = $(LIBPTHREAD_PATH)/build/lib/ |
---|
33 | LIBPTHREAD_INCLUDE = $(LIBPTHREAD_PATH)/build/include/ |
---|
34 | |
---|
35 | |
---|
36 | HAL = $(ALMOS-MKH_DIR)/hal |
---|
37 | KERNEL = $(ALMOS-MKH_DIR)/kernel |
---|
38 | |
---|
39 | |
---|
40 | ifeq ($(ARCH_NAME), tsar_mips32) |
---|
41 | $(info ARCH_NAME is tsar_mips32) |
---|
42 | export CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \ |
---|
43 | -fno-delete-null-pointer-checks -std=gnu89 |
---|
44 | export CC = mipsel-unknown-elf-gcc |
---|
45 | export AS = mipsel-unknown-elf-as |
---|
46 | export LD = mipsel-unknown-elf-ld |
---|
47 | export DU = mipsel-unknown-elf-objdump |
---|
48 | export AR = mipsel-unknown-elf-ar |
---|
49 | export RANLIB = mipsel-unknown-elf-ranlib |
---|
50 | endif |
---|
51 | |
---|
52 | ifeq ($(ARCH_NAME), x86_64) |
---|
53 | $(info ARCH_NAME is x86_64) |
---|
54 | export CFLAGS = -Wall -ffreestanding -mno-red-zone -mno-mmx -mno-sse -mno-avx -g \ |
---|
55 | -fno-delete-null-pointer-checks -mcmodel=large -std=gnu89 |
---|
56 | export CC = gcc |
---|
57 | export AS = as |
---|
58 | export LD = ld |
---|
59 | export DU = objdump |
---|
60 | export AR = ar |
---|
61 | export RANLIB = ranlib |
---|
62 | endif |
---|
63 | |
---|
64 | ifeq ($(ARCH_NAME),) |
---|
65 | $(error Your ARCH_NAME is not support, check params-soft.mk!) |
---|
66 | endif |
---|
67 | |
---|
68 | BOOTLOADER_PATH = boot/$(ARCH_NAME) |
---|
69 | HAL_ARCH = $(HAL)/$(ARCH_NAME) |
---|
70 | |
---|
71 | |
---|
72 | |
---|