summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sandbox/cpu/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile
index e5e860b715..2ae0f7155c 100644
--- a/arch/sandbox/cpu/Makefile
+++ b/arch/sandbox/cpu/Makefile
@@ -23,9 +23,6 @@
# MA 02111-1307 USA
#
-# os.c is build in the system environment, so needs standard includes
-CPPFLAGS_arch/sandbox/cpu/os.o += -I/usr/include
-
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).o
@@ -40,6 +37,10 @@ all: $(obj).depend $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+# os.c is build in the system environment, so needs standard includes
+$(obj)os.o: ALL_CFLAGS := $(filter-out -nostdinc,$(ALL_CFLAGS))
+$(obj).depend.os: CPPFLAGS := $(filter-out -nostdinc,$(CPPFLAGS))
+
#########################################################################
# defines $(obj).depend target
OpenPOWER on IntegriCloud