source: trunk/params-soft.mk @ 678

Last change on this file since 678 was 634, checked in by alain, 6 years ago

Fix a bug in hal_irqmask.c

File size: 2.8 KB
RevLine 
[439]1
[445]2# define absolute path to almos-mkh directory
[634]3ALMOSMKH_DIR = /Users/alain/soc/almos-mkh/
[439]4
[445]5# Select the libc
[439]6LIBC_NAME = mini-libc
7#LIBC_NAME = newlib
8
[445]9# Select the target architecture
[439]10ARCH_NAME = tsar_mips32
11#ARCH_NAME = x86_64
12
[445]13# check
[444]14ifeq ($(ALMOSMKH_DIR),)
15$(error Please define ALMOSMKH_DIR parameter in params-soft.mk!)
[439]16endif
17
[445]18ifeq ($(ARCH_NAME),)
19$(error Please define ARCH_NAME parameter in params-soft.mk!)
20endif
[439]21
[610]22ifeq ($(LIBC_NAME),)
23$(error Please define LIBC_NAME parameter in params-soft.mk!)
24endif
25
[445]26# define path for LIBC
[439]27ifeq ($(LIBC_NAME), mini-libc)
[445]28  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/mini-libc/
29  LIBC         = $(LIBC_PATH)/build/lib/
[444]30  LIBC_INCLUDE = $(LIBC_PATH)/build/include/
[439]31endif
32ifeq ($(LIBC_NAME), newlib)
[444]33  ifeq ($(ARCH_NAME), tsar_mips32)
34    ARCH_NEWLIB=mipsel
35  endif
36  #TODO for x86
[445]37  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/newlib/
38  LIBC         = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/lib/
[444]39  LIBC_INCLUDE = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/include/
[439]40endif
41
[445]42# define paths for LIBPTHREAD
43LIBPTHREAD_PATH    = $(ALMOSMKH_DIR)/libs/libpthread/
44LIBPTHREAD         = $(LIBPTHREAD_PATH)/build/lib/
45LIBPTHREAD_INCLUDE = $(LIBPTHREAD_PATH)/build/include/
[439]46
[457]47# define paths for LIBSEMAPHORE
48LIBSEMAPHORE_PATH    = $(ALMOSMKH_DIR)/libs/libsemaphore
49LIBSEMAPHORE         = $(LIBSEMAPHORE_PATH)/build/lib/
50LIBSEMAPHORE_INCLUDE = $(LIBSEMAPHORE_PATH)/build/include/
51
[459]52# define paths for LIBMATH
53LIBMATH_PATH    = $(ALMOSMKH_DIR)/libs/libmath
54LIBMATH         = $(LIBMATH_PATH)/build/lib/
55LIBMATH_INCLUDE = $(LIBMATH_PATH)/build/include/
56
[445]57# define paths for LIBALMOSMKH
58LIBALMOSMKH_PATH    = $(ALMOSMKH_DIR)/libs/libalmosmkh
59LIBALMOSMKH         = $(LIBALMOSMKH_PATH)/build/lib/
[444]60LIBALMOSMKH_INCLUDE = $(LIBALMOSMKH_PATH)/build/include/
[439]61
[445]62# define paths for HAL
[459]63HAL            = $(ALMOSMKH_DIR)/hal
64HAL_ARCH       = $(HAL)/$(ARCH_NAME)
65HAL_INCLUDE    = $(HAL_ARCH)/core
[439]66
[459]67# define paths for KERNEL
68KERNEL         = $(ALMOSMKH_DIR)/kernel
[444]69SHARED_INCLUDE = $(KERNEL)/syscalls/shared_include/
[439]70
71
72ifeq ($(ARCH_NAME), tsar_mips32)
73    $(info ARCH_NAME is tsar_mips32)
[466]74    export CFLAGS = -Wall -Wextra -ffreestanding -mno-gpopt -mips32 -g -ggdb -O2 \
75                -fno-delete-null-pointer-checks -std=gnu89
[439]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
[440]81    export RANLIB = mipsel-unknown-elf-ranlib
[439]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
[440]93    export RANLIB = ranlib
[439]94endif
95
96BOOTLOADER_PATH = boot/$(ARCH_NAME)
97
98
99
Note: See TracBrowser for help on using the repository browser.