From 99e06c53e512dd3ab0e356524f3828af8c69c946 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Wed, 1 Jan 2020 13:20:30 -0600 Subject: [PATCH] Build: show directory during compilation, remove default rules When using -j, it can be confusing to see files being compiled out of order, so prefix compilation with the directory it's building for. --- Makefile.common | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile.common b/Makefile.common index 203bd090fbd..4849feec65d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -84,24 +84,26 @@ endif -include $(SUFFIXED_OBJS:%.o=%.d) +.SUFFIXES: + %$(OBJ_SUFFIX).o: %.cpp $(EXTRA_SOURCES) - @echo "C++ $@" + @echo "$(notdir $(CURDIR)): C++ $@" $(QUIET) $(CXX) $(CXXFLAGS) -o $@ -c $< %$(OBJ_SUFFIX).o: %.c - @echo "C $@" + @echo "$(notdir $(CURDIR)): C $@" $(QUIET) $(CC) $(CFLAGS) -o $@ -c $< %.ao: %.S - @echo "AS $@" + @echo "$(notdir $(CURDIR)): AS $@" $(QUIET) $(AS) -o $@ $< $(PROGRAM): $(STATIC_LIB_DEPS) $(SUFFIXED_OBJS) $(EXTRA_OBJS) - @echo "LINK $(PROGRAM)" + @echo "$(notdir $(CURDIR)): LINK $(PROGRAM)" $(QUIET) $(CXX) -o $(PROGRAM) $(EXTRA_OBJS) $(SUFFIXED_OBJS) $(LDFLAGS) $(LIBRARY): $(SUFFIXED_OBJS) $(EXTRA_OBJS) - @echo "LIB $@" + @echo "$(notdir $(CURDIR)): LIB $@" $(QUIET) $(AR) rcs $@ $(OBJS) $(EXTRA_OBJS) $(LIBS) $(POST_LIBRARY_BUILD) @@ -126,7 +128,7 @@ all: $(PROGRAM) $(LIBRARY) EXTRA_CLEAN ?= clean: - @echo "CLEAN" + @echo "$(notdir $(CURDIR)): CLEAN" $(QUIET) rm -f $(PROGRAM) $(LIBRARY) $(SUFFIXED_OBJS) $(EXTRA_OBJS) *.d $(EXTRA_CLEAN) install: