]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/cpu/Makefile
sandbox: fix compiling of cpu/os.c
[karo-tx-uboot.git] / arch / sandbox / cpu / Makefile
index e5e860b71565197641407a362591c68712e71c44..2ae0f7155c022967b7950c915eb128d7da660317 100644 (file)
@@ -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