source: trunk/params-soft.mk @ 667

Last change on this file since 667 was 634, checked in by alain, 5 years ago

Fix a bug in hal_irqmask.c

File size: 2.8 KB
Line 
1
2# define absolute path to almos-mkh directory
3ALMOSMKH_DIR = /Users/alain/soc/almos-mkh/
4
5# Select the libc
6LIBC_NAME = mini-libc
7#LIBC_NAME = newlib
8
9# Select the target architecture
10ARCH_NAME = tsar_mips32
11#ARCH_NAME = x86_64
12
13# check
14ifeq ($(ALMOSMKH_DIR),)
15$(error Please define ALMOSMKH_DIR parameter in params-soft.mk!)
16endif
17
18ifeq ($(ARCH_NAME),)
19$(error Please define ARCH_NAME parameter in params-soft.mk!)
20endif
21
22ifeq ($(LIBC_NAME),)
23$(error Please define LIBC_NAME parameter in params-soft.mk!)
24endif
25
26# define path for LIBC
27ifeq ($(LIBC_NAME), mini-libc)
28  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/mini-libc/
29  LIBC         = $(LIBC_PATH)/build/lib/
30  LIBC_INCLUDE = $(LIBC_PATH)/build/include/
31endif
32ifeq ($(LIBC_NAME), newlib)
33  ifeq ($(ARCH_NAME), tsar_mips32)
34    ARCH_NEWLIB=mipsel
35  endif
36  #TODO for x86
37  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/newlib/
38  LIBC         = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/lib/
39  LIBC_INCLUDE = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/include/
40endif
41
42# define paths for LIBPTHREAD
43LIBPTHREAD_PATH    = $(ALMOSMKH_DIR)/libs/libpthread/
44LIBPTHREAD         = $(LIBPTHREAD_PATH)/build/lib/
45LIBPTHREAD_INCLUDE = $(LIBPTHREAD_PATH)/build/include/
46
47# define paths for LIBSEMAPHORE
48LIBSEMAPHORE_PATH    = $(ALMOSMKH_DIR)/libs/libsemaphore
49LIBSEMAPHORE         = $(LIBSEMAPHORE_PATH)/build/lib/
50LIBSEMAPHORE_INCLUDE = $(LIBSEMAPHORE_PATH)/build/include/
51
52# define paths for LIBMATH
53LIBMATH_PATH    = $(ALMOSMKH_DIR)/libs/libmath
54LIBMATH         = $(LIBMATH_PATH)/build/lib/
55LIBMATH_INCLUDE = $(LIBMATH_PATH)/build/include/
56
57# define paths for LIBALMOSMKH
58LIBALMOSMKH_PATH    = $(ALMOSMKH_DIR)/libs/libalmosmkh
59LIBALMOSMKH         = $(LIBALMOSMKH_PATH)/build/lib/
60LIBALMOSMKH_INCLUDE = $(LIBALMOSMKH_PATH)/build/include/
61
62# define paths for HAL
63HAL            = $(ALMOSMKH_DIR)/hal
64HAL_ARCH       = $(HAL)/$(ARCH_NAME)
65HAL_INCLUDE    = $(HAL_ARCH)/core
66
67# define paths for KERNEL
68KERNEL         = $(ALMOSMKH_DIR)/kernel
69SHARED_INCLUDE = $(KERNEL)/syscalls/shared_include/
70
71
72ifeq ($(ARCH_NAME), tsar_mips32)
73    $(info ARCH_NAME is tsar_mips32)
74    export CFLAGS = -Wall -Wextra -ffreestanding -mno-gpopt -mips32 -g -ggdb -O2 \
75                -fno-delete-null-pointer-checks -std=gnu89
76    export CC = mipsel-unknown-elf-gcc
77    export AS = mipsel-unknown-elf-as
78    export LD = mipsel-unknown-elf-ld
79    export DU = mipsel-unknown-elf-objdump
80    export AR = mipsel-unknown-elf-ar
81    export RANLIB = mipsel-unknown-elf-ranlib
82endif
83
84ifeq ($(ARCH_NAME), x86_64)
85    $(info ARCH_NAME is x86_64)
86    export CFLAGS = -Wall -ffreestanding -mno-red-zone -mno-mmx -mno-sse -mno-avx -g \
87      -fno-delete-null-pointer-checks -mcmodel=large -std=gnu89
88    export CC = gcc
89    export AS = as
90    export LD = ld
91    export DU = objdump
92    export AR = ar
93    export RANLIB = ranlib
94endif
95
96BOOTLOADER_PATH = boot/$(ARCH_NAME)
97
98
99
Note: See TracBrowser for help on using the repository browser.