[make] output a text file with all the source files and include paths used in the build

This commit is contained in:
Travis Geiselbrecht
2015-11-20 20:51:52 -08:00
parent 614eaf166a
commit 8a57db12ee
3 changed files with 19 additions and 0 deletions

View File

@@ -77,6 +77,9 @@ ALLOBJS_MODULE :=
# master object list (for dep generation)
ALLOBJS :=
# master source file list
ALLSRCS :=
# a linker script needs to be declared in one of the project/target/platform files
LINKER_SCRIPT :=

View File

@@ -49,5 +49,18 @@ $(OUTELF).size: $(OUTELF)
@echo generating size map: $@
$(NOECHO)$(NM) -S --size-sort $< > $@
# print some information about the build
$(BUILDDIR)/srcfiles.txt:
@echo generating $@
$(NOECHO)echo $(sort $(ALLSRCS)) | tr ' ' '\n' > $@
.PHONY: $(BUILDDIR)/srcfiles.txt
$(BUILDDIR)/include_paths.txt:
@echo generating $@
$(NOECHO)echo $(subst -I,,$(sort $(GLOBAL_INCLUDES))) | tr ' ' '\n' > $@
.PHONY: $(BUILDDIR)/include_paths.txt
#include arch/$(ARCH)/compile.mk

View File

@@ -89,6 +89,9 @@ $(MODULE_OBJECT): $(MODULE_OBJS) $(MODULE_EXTRA_OBJS)
@echo linking $@
$(NOECHO)$(LD) $(GLOBAL_MODULE_LDFLAGS) -r $^ -o $@
# track all of the source files compiled
ALLSRCS += $(MODULE_SRCS)
# track all the objects built
ALLOBJS += $(MODULE_OBJS)