Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
[oweals/u-boot.git] / arch / sandbox / cpu / Makefile
index e5e860b71565197641407a362591c68712e71c44..6fd09ff65b14861153ea72f08ceaf632993ff60e 100644 (file)
 # 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
 
-COBJS  := cpu.o start.o os.o
+COBJS  := cpu.o os.o start.o state.o
 
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
@@ -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