old-MTGos/kernel.settings

42 lines
889 B
Text
Raw Normal View History

2016-08-14 18:04:41 +00:00
arch = 3ds
subvar = 9
MODE = debug
export PATH := $(HOME)/opt/bin:$(PATH)
LDFLAGS = -fPIC
ifeq ($(arch),x86)
PREFIX = i686-mtgos-
libpath = i686-mtgos
ARCHFLAGS = -m32
else
ifeq ($(arch),x86_64)
2016-08-14 16:13:51 +00:00
PREFIX = x86_64-elf-
libpath = x86_64-elf
ARCHFLAGS = -m64 -mno-red-zone
LDFLAGS += -z max-page-size=0x1000
else
ifeq ($(arch),3ds)
PREFIX = arm-none-eabi-
libpath = arm-none-eabi
ifeq ($(subvar),9)
2016-08-09 14:18:58 +00:00
ARCHFLAGS = -mcpu=arm946e-s -march=armv5te -mlittle-endian -DARM9
MOD_SUFF=neun
else
2016-08-09 14:18:58 +00:00
ARCHFLAGS = -mcpu=mpcore -mlittle-endian -DARM11
MOD_SUFF=elf
endif
endif
endif
endif
ifeq ($(MODE),debug)
CFLAGS := -g3 -DDEBUG
ASFLAGS := -g3 -DDEBUG
CPPFLAGS := -g3 -DDEBUG
else
CFLAGS := -O2
CPPFLAGS := -O2
endif
ASFLAGS += $(ARCHFLAGS)
CFLAGS += -fPIC $(ARCHFLAGS)
CPPFLAGS += -fPIC $(ARCHFLAGS)