]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/cpu/Makefile
sandbox: Add SDL library for LCD, keyboard, audio
[karo-tx-uboot.git] / arch / sandbox / cpu / Makefile
index 58c2537762774f7f019a6e27be4de5e0356bfe93..7d4410c42a20a6760babfdf28308a3069cd36fec 100644 (file)
@@ -8,9 +8,15 @@
 #
 
 obj-y  := cpu.o os.o start.o state.o
+obj-$(CONFIG_SANDBOX_SDL)      += sdl.o
 
 # os.c is build in the system environment, so needs standard includes
-$(obj)os.o: ALL_CFLAGS := $(BASE_CPPFLAGS) \
-       $(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS))
-$(obj).depend.os: CPPFLAGS := $(BASE_CPPFLAGS) \
-       $(patsubst %, -idirafter %, $(BASE_INCLUDE_DIRS))
+# CFLAGS_REMOVE_os.o cannot be used to drop header include path
+quiet_cmd_cc_os.o = CC $(quiet_modtag)  $@
+cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \
+       $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $<
+
+$(obj)/os.o: $(src)/os.c FORCE
+       $(call if_changed_dep,cc_os.o)
+$(obj)/sdl.o: $(src)/sdl.c FORCE
+       $(call if_changed_dep,cc_os.o)