From 35ba9cf735376b74d949032cdb2c726b216c25d8 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Thu, 27 Oct 2016 23:54:42 +1100 Subject: [PATCH] soc/software/Makefile: Fix Makefile depend generation. Previously the flags were not actually set and the *.d files were never actually generated. --- litex/soc/software/common.mak | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/litex/soc/software/common.mak b/litex/soc/software/common.mak index bc56b8310..7ef85aae7 100644 --- a/litex/soc/software/common.mak +++ b/litex/soc/software/common.mak @@ -34,17 +34,19 @@ else OBJCOPY = $(OBJCOPY_quiet) endif +# http://scottmcpeak.com/autodepend/autodepend.html +# Generate *.d Makefile dependencies fragments, include using; +# -include $(OBJECTS:.o=.d) +DEPFLAGS += -MD -MP + # Toolchain options # INCLUDES = -I$(SOC_DIRECTORY)/software/include/base -I$(SOC_DIRECTORY)/software/include -I$(SOC_DIRECTORY)/common -I$(BUILDINC_DIRECTORY) -COMMONFLAGS = -Os $(CPUFLAGS) -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES) +COMMONFLAGS = $(DEPFLAGS) -Os $(CPUFLAGS) -fomit-frame-pointer -Wall -fno-builtin -nostdinc $(INCLUDES) CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY) -# compile and generate dependencies, based on -# http://scottmcpeak.com/autodepend/autodepend.html - define compilexx $(CX) -c $(CXXFLAGS) $(1) $< -o $@ endef