summaryrefslogtreecommitdiffstats
path: root/arch/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/Makefile12
-rw-r--r--arch/sandbox/os/Makefile10
2 files changed, 7 insertions, 15 deletions
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index b7470c3330..3d2eb5bc11 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -1,6 +1,6 @@
KBUILD_DEFCONFIG := sandbox_defconfig
-CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden
+KBUILD_CPPFLAGS += -D__SANDBOX__ -fno-strict-aliasing -fvisibility=hidden
machine-y := sandbox
@@ -11,7 +11,7 @@ lds-y := $(BOARD)/barebox.lds
TEXT_BASE = $(CONFIG_TEXT_BASE)
-CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
+KBUILD_CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
-Dfree=barebox_free -Drealloc=barebox_realloc \
-Dread=barebox_read -Dwrite=barebox_write \
-Dopen=barebox_open -Dclose=barebox_close \
@@ -29,11 +29,7 @@ CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y))
-ifeq ($(KBUILD_SRC),)
-CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
-else
-CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
-endif
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
archprepare: maketools
@@ -48,7 +44,7 @@ FTDI1_LIBS := $(shell pkg-config libftdi1 --libs)
endif
ifeq ($(CONFIG_KASAN),y)
-CPPFLAGS += -fsanitize=address
+KBUILD_CPPFLAGS += -fsanitize=address
SANITIZER_LIBS += -fsanitize=address
endif
diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile
index 75baa34a83..c012c9cf01 100644
--- a/arch/sandbox/os/Makefile
+++ b/arch/sandbox/os/Makefile
@@ -2,15 +2,11 @@ machine-y := sandbox
machdirs := $(patsubst %,arch/sandbox/mach-%/,$(machine-y))
-ifeq ($(KBUILD_SRC),)
-CPPFLAGS := $(patsubst %,-I%include,$(machdirs))
-else
-CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
-endif
+KBUILD_CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
-CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
+KBUILD_CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE)
-CFLAGS := -Wall
+KBUILD_CFLAGS := -Wall
NOSTDINC_FLAGS :=
obj-y = common.o tap.o