build: add support for freestanding builds

master
Ariadne Conill 2020-12-06 03:08:14 -06:00
parent e65e485630
commit d44eba0b22
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,12 @@ LIBDIR := /lib
CFLAGS := -ggdb3 -O2 -Wall
CPPFLAGS := -Iarch/${ARCH} -Iarch/common
EXPORT_UNPREFIXED := yes
FREESTANDING := no
ifeq ($(FREESTANDING),yes)
CFLAGS += -DFREESTANDING -isystem arch/${ARCH}/freestanding
EXPORT_UNPREFIXED = no
endif
ifeq ($(EXPORT_UNPREFIXED),yes)
CFLAGS += -DEXPORT_UNPREFIXED