Merge pull request #86 from michaelgruenewald/patch-1

Fix changed files detection in Make
This commit is contained in:
joeycastillo 2022-10-08 19:56:26 -05:00 committed by GitHub
commit 33dec21cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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) \

View File

@ -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))