summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoshua stein <jcs@jcs.org>2020-01-01 13:20:30 -0600
committerAndreas Kling <awesomekling@gmail.com>2020-01-01 22:21:50 +0100
commit99e06c53e512dd3ab0e356524f3828af8c69c946 (patch)
tree6634a799ea29c1c480941da260a4b0e565d6d779
parenta1fd2eb23744c40116eef010bf9e889f592b980f (diff)
downloadserenity-99e06c53e512dd3ab0e356524f3828af8c69c946.zip
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.
-rw-r--r--Makefile.common14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.common b/Makefile.common
index 203bd090fb..4849feec65 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: