Merge pull request #7 from mithro/master
soc/software/Makefile: Fix Makefile depend generation.
This commit is contained in:
commit
29112c67e9
|
@ -34,17 +34,19 @@ else
|
||||||
OBJCOPY = $(OBJCOPY_quiet)
|
OBJCOPY = $(OBJCOPY_quiet)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# http://scottmcpeak.com/autodepend/autodepend.html
|
||||||
|
# Generate *.d Makefile dependencies fragments, include using;
|
||||||
|
# -include $(OBJECTS:.o=.d)
|
||||||
|
DEPFLAGS += -MD -MP
|
||||||
|
|
||||||
# Toolchain options
|
# Toolchain options
|
||||||
#
|
#
|
||||||
INCLUDES = -I$(SOC_DIRECTORY)/software/include/base -I$(SOC_DIRECTORY)/software/include -I$(SOC_DIRECTORY)/common -I$(BUILDINC_DIRECTORY)
|
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
|
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
|
CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(SOC_DIRECTORY)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding
|
||||||
LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)
|
LDFLAGS = -nostdlib -nodefaultlibs -L$(BUILDINC_DIRECTORY)
|
||||||
|
|
||||||
# compile and generate dependencies, based on
|
|
||||||
# http://scottmcpeak.com/autodepend/autodepend.html
|
|
||||||
|
|
||||||
define compilexx
|
define compilexx
|
||||||
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
$(CX) -c $(CXXFLAGS) $(1) $< -o $@
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue