Skip to content

Commit aa488d7

Browse files
authored
Reduce gcc/Makefile prints to simplify build output (#181)
The gcc commandlines and other prints can be useful, but most of the time they are overwhelming especially for non-C programmers. This simplifies the prints. To re-enable, set `V=1` like is common with many Makefile/C projects. For example `V=1 make`, `V=1 mix compile`, etc.
1 parent c163e92 commit aa488d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,15 @@ all: $(PREFIX) $(BUILD) $(ARCHIVE_NAME)
106106
endif
107107

108108
$(BUILD)/%.o: c_src/%.c
109+
@echo " CC $(notdir $@)"
109110
$(CC) -c $(CFLAGS) -o $@ $<
110111

111112
$(LIB_NAME): $(OBJ)
113+
@echo " LD $(notdir $@)"
112114
$(CC) -o $@ $(LDFLAGS) $^
113115

114116
$(ARCHIVE_NAME): $(OBJ)
117+
@echo " AR $(notdir $@)"
115118
$(AR) -rv $@ $^
116119

117120
$(PREFIX) $(BUILD):
@@ -121,3 +124,6 @@ clean:
121124
$(RM) $(LIB_NAME) $(ARCHIVE_NAME) $(OBJ)
122125

123126
.PHONY: all clean
127+
128+
# Don't echo commands unless the caller exports "V=1"
129+
${V}.SILENT:

0 commit comments

Comments
 (0)