Added build type detection, simplified legacy BIOS booting on x86_64
This commit is contained in:
parent
0236209e95
commit
1fc97f9c5f
18 changed files with 298 additions and 107 deletions
|
@ -21,16 +21,19 @@
|
|||
|
||||
export INCLUDE_DIRS := $(BOOT_ROOT)/include
|
||||
|
||||
export DEFINES += __$(ARCH)__ \
|
||||
_AXBOOT
|
||||
|
||||
export BUILD_DIR ?= build
|
||||
export SYSROOT_DIR ?= sysroot
|
||||
|
||||
export ASFLAGS :=
|
||||
export CFLAGS := -D__$(ARCH) -D_AXBOOT -ffreestanding -fno-stack-protector -fno-stack-check -MMD -MP
|
||||
export ASFLAGS := $(foreach d, $(DEFINES), -D$d)
|
||||
export CFLAGS := $(foreach d, $(DEFINES), -D$d) -ffreestanding -fno-stack-protector -fno-stack-check -MMD -MP
|
||||
export LDFLAGS := -nostdlib
|
||||
|
||||
export BOOT_ROOT := $(ROOT_DIR)/boot
|
||||
|
||||
ifeq ($(DEBUG),yes)
|
||||
ifeq ($(BUILD_TYPE),debug)
|
||||
CFLAGS += -O0 -g3
|
||||
else
|
||||
CFLAGS += -O2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue