]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sandbox/cpu/Makefile
kbuild: use Linux Kernel build scripts
[karo-tx-uboot.git] / arch / sandbox / cpu / Makefile
index c5f5426b05f2041e5d15e14ae45ffb244d0b56f5..63dededf70f85125bbb67a9dce1c3cb31e6a23e6 100644 (file)
 obj-y  := cpu.o os.o start.o state.o
 
 # os.c is build in the system environment, so needs standard includes
-$(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\
-       $(patsubst -I%,-idirafter%,$(CFLAGS)))
-$(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\
-       $(patsubst -I%,-idirafter%,$(CPPFLAGS)))
+# 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)