source: trunk/params-soft.mk @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

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