]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
rockchip: Add proper dependency tracking to M0 Makefile
authorJulius Werner <jwerner@chromium.org>
Thu, 3 Nov 2016 19:25:48 +0000 (12:25 -0700)
committerJulius Werner <jwerner@chromium.org>
Thu, 3 Nov 2016 21:57:11 +0000 (14:57 -0700)
This patch adds dependency rule generation and inclusion to the M0
Makefile, so that M0 objects will get correctly remade with an
incremental build if a header file they included changed.

Change-Id: I2067bd9fd4d9dad3e77a09cbf09c7b4db3c1eda5
Signed-off-by: Julius Werner <jwerner@chromium.org>
plat/rockchip/rk3399/drivers/m0/Makefile

index a041929824498d5a43bf1eada17acf722108b843..b8e3cd410b343da17b3a4c00ae194cc0ee69fdad 100644 (file)
@@ -91,10 +91,11 @@ BIN                         := $(BUILD)/$(PLAT_M0).bin
 # Function definition related compilation
 define MAKE_C
 $(eval OBJ := $(1)/$(patsubst %.c,%.o,$(notdir $(2))))
+-include $(patsubst %.o,%.d,$(OBJ))
 
 $(OBJ) : $(2)
        @echo "  CC      $$<"
-       $$(Q)$$(CC) $$(CFLAGS) $$(INCLUDES) -c $$< -o $$@
+       $$(Q)$$(CC) $$(CFLAGS) $$(INCLUDES) -MMD -MT $$@ -c $$< -o $$@
 endef
 
 define MAKE_S