From d44eba0b2244d7f70a04675f54a657f86dc1b8b1 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 6 Dec 2020 03:08:14 -0600 Subject: [PATCH] build: add support for freestanding builds --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 9f0c134..bddd41f 100644 --- a/Makefile +++ b/Makefile @@ -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