source: trunk/params-soft.mk @ 457

Last change on this file since 457 was 457, checked in by alain, 3 years ago

This version modifies the exec syscall and fixes a large number of small bugs.
The version number has been updated (0.1)

File size: 2.4 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
22# define path for LIBC
23ifeq ($(LIBC_NAME), mini-libc)
24  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/mini-libc/
25  LIBC         = $(LIBC_PATH)/build/lib/
26  LIBC_INCLUDE = $(LIBC_PATH)/build/include/
27endif
28ifeq ($(LIBC_NAME), newlib)
29  ifeq ($(ARCH_NAME), tsar_mips32)
30    ARCH_NEWLIB=mipsel
31  endif
32  #TODO for x86
33  LIBC_PATH    = $(ALMOSMKH_DIR)/libs/newlib/
34  LIBC         = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/lib/
35  LIBC_INCLUDE = $(LIBC_PATH)/build/$(ARCH_NEWLIB)-almosmkh/include/
36endif
37
38# define paths for LIBPTHREAD
39LIBPTHREAD_PATH    = $(ALMOSMKH_DIR)/libs/libpthread/
40LIBPTHREAD         = $(LIBPTHREAD_PATH)/build/lib/
41LIBPTHREAD_INCLUDE = $(LIBPTHREAD_PATH)/build/include/
42
43# define paths for LIBSEMAPHORE
44LIBSEMAPHORE_PATH    = $(ALMOSMKH_DIR)/libs/libsemaphore
45LIBSEMAPHORE         = $(LIBSEMAPHORE_PATH)/build/lib/
46LIBSEMAPHORE_INCLUDE = $(LIBSEMAPHORE_PATH)/build/include/
47
48# define paths for LIBALMOSMKH
49LIBALMOSMKH_PATH    = $(ALMOSMKH_DIR)/libs/libalmosmkh
50LIBALMOSMKH         = $(LIBALMOSMKH_PATH)/build/lib/
51LIBALMOSMKH_INCLUDE = $(LIBALMOSMKH_PATH)/build/include/
52
53# define paths for HAL
54HAL      = $(ALMOSMKH_DIR)/hal
55HAL_ARCH = $(HAL)/$(ARCH_NAME)
56
57KERNEL   = $(ALMOSMKH_DIR)/kernel
58
59SHARED_INCLUDE = $(KERNEL)/syscalls/shared_include/
60
61
62ifeq ($(ARCH_NAME), tsar_mips32)
63    $(info ARCH_NAME is tsar_mips32)
64    export CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \
65                 -fno-delete-null-pointer-checks -std=gnu89
66    export CC = mipsel-unknown-elf-gcc
67    export AS = mipsel-unknown-elf-as
68    export LD = mipsel-unknown-elf-ld
69    export DU = mipsel-unknown-elf-objdump
70    export AR = mipsel-unknown-elf-ar
71    export RANLIB = mipsel-unknown-elf-ranlib
72endif
73
74ifeq ($(ARCH_NAME), x86_64)
75    $(info ARCH_NAME is x86_64)
76    export CFLAGS = -Wall -ffreestanding -mno-red-zone -mno-mmx -mno-sse -mno-avx -g \
77      -fno-delete-null-pointer-checks -mcmodel=large -std=gnu89
78    export CC = gcc
79    export AS = as
80    export LD = ld
81    export DU = objdump
82    export AR = ar
83    export RANLIB = ranlib
84endif
85
86BOOTLOADER_PATH = boot/$(ARCH_NAME)
87
88
89
Note: See TracBrowser for help on using the repository browser.