Merge pull request #86 from michaelgruenewald/patch-1
Fix changed files detection in Make
This commit is contained in:
commit
33dec21cf1
1
make.mk
1
make.mk
@ -159,6 +159,7 @@ else
|
|||||||
|
|
||||||
CFLAGS += -W -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations
|
CFLAGS += -W -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations
|
||||||
CFLAGS += -Wno-format -Wno-unused-parameter
|
CFLAGS += -Wno-format -Wno-unused-parameter
|
||||||
|
CFLAGS += -MD -MP -MT $(BUILD)/$(*F).o -MF $(BUILD)/$(@F).d
|
||||||
|
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
-I$(TOP)/boards/$(BOARD) \
|
-I$(TOP)/boards/$(BOARD) \
|
||||||
|
4
rules.mk
4
rules.mk
@ -1,3 +1,5 @@
|
|||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
CFLAGS += $(INCLUDES) $(DEFINES)
|
CFLAGS += $(INCLUDES) $(DEFINES)
|
||||||
|
|
||||||
OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
|
OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
|
||||||
@ -60,6 +62,6 @@ clean:
|
|||||||
analyze:
|
analyze:
|
||||||
@$(COBRA) basic $(INCLUDES) $(DEFINES) $(SRCS)
|
@$(COBRA) basic $(INCLUDES) $(DEFINES) $(SRCS)
|
||||||
|
|
||||||
DEPFILES := $(SRCS:%.c=$(BUILD)/%.d)
|
DEPFILES := $(OBJS:%.o=%.o.d)
|
||||||
|
|
||||||
-include $(wildcard $(DEPFILES))
|
-include $(wildcard $(DEPFILES))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user