Browse Source

Made most of the build much quieter

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
6ce5c97981
2 changed files with 25 additions and 11 deletions
  1. 6
    6
      src/Makefile
  2. 19
    5
      src/Makefile.housekeeping

+ 6
- 6
src/Makefile View File

115
 # Rules for specific object types.
115
 # Rules for specific object types.
116
 #
116
 #
117
 COMPILE_c	= $(CC) $(CFLAGS) $(CFLAGS_c) $(OBJ_CFLAGS)
117
 COMPILE_c	= $(CC) $(CFLAGS) $(CFLAGS_c) $(OBJ_CFLAGS)
118
-RULE_c		= $(COMPILE_c) -c $< -o $@
119
-RULE_c_to_dbg%.o = $(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
120
-RULE_c_to_c	= $(COMPILE_c) -E -c $< > $@
121
-RULE_c_to_s	= $(COMPILE_c) -S -g0 -c $< -o $@ 
118
+RULE_c		= $(Q)$(COMPILE_c) -c $< -o $@
119
+RULE_c_to_dbg%.o = $(Q)$(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
120
+RULE_c_to_c	= $(Q)$(COMPILE_c) -E -c $< > $@
121
+RULE_c_to_s	= $(Q)$(COMPILE_c) -S -g0 -c $< -o $@ 
122
 
122
 
123
 PREPROCESS_S	= $(CPP) $(CFLAGS) $(CFLAGS_S) $(OBJ_CFLAGS)
123
 PREPROCESS_S	= $(CPP) $(CFLAGS) $(CFLAGS_S) $(OBJ_CFLAGS)
124
 ASSEMBLE_S	= $(AS) $(ASFLAGS)
124
 ASSEMBLE_S	= $(AS) $(ASFLAGS)
125
-RULE_S		= $(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
126
-RULE_S_to_s	= $(PREPROCESS_S) $< > $@
125
+RULE_S		= $(Q)$(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
126
+RULE_S_to_s	= $(Q)$(PREPROCESS_S) $< > $@
127
 
127
 
128
 DEBUG_TARGETS	+= dbg%.o c s
128
 DEBUG_TARGETS	+= dbg%.o c s
129
 
129
 

+ 19
- 5
src/Makefile.housekeeping View File

39
 	@$(TOUCH) $@
39
 	@$(TOUCH) $@
40
 VERYCLEANUP	+= .toolcheck
40
 VERYCLEANUP	+= .toolcheck
41
 
41
 
42
+# Build verbosity
43
+#
44
+ifeq ($(V),1)
45
+Q = 
46
+QM = @\#
47
+else
48
+Q = @
49
+QM = @
50
+endif
51
+
42
 # Check for an old version of gas (binutils 2.9.1)
52
 # Check for an old version of gas (binutils 2.9.1)
43
 #
53
 #
44
 OLDGAS	:= $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
54
 OLDGAS	:= $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
111
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
121
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
112
 		-M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
122
 		-M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
113
 	@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
123
 	@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
124
+		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
114
 		 '\n\t$$(RULE_$(3))\n' \
125
 		 '\n\t$$(RULE_$(3))\n' \
115
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
126
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
116
 		 $(foreach TGT,$(DEBUG_TARGETS), \
127
 		 $(foreach TGT,$(DEBUG_TARGETS), \
117
 		    $(if $(RULE_$(3)_to_$(TGT)), \
128
 		    $(if $(RULE_$(3)_to_$(TGT)), \
118
 		    '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
129
 		    '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
130
+		    '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
119
 		    '\n\t$$(RULE_$(3)_to_$(TGT))\n' \
131
 		    '\n\t$$(RULE_$(3)_to_$(TGT))\n' \
120
 		    '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
132
 		    '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
121
 		 '\n$(2) : $$($(4)_DEPS)\n' \
133
 		 '\n$(2) : $$($(4)_DEPS)\n' \
274
 #
286
 #
275
 BLIB		= $(BIN)/blib.a
287
 BLIB		= $(BIN)/blib.a
276
 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
288
 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
277
-	$(RM) $(BLIB)
278
-	$(AR) r $@ $(BLIB_OBJS)
279
-	$(RANLIB) $@
289
+	$(Q)$(RM) $(BLIB)
290
+	$(QM)echo "  [AR] $@"
291
+	$(Q)$(AR) r $@ $(BLIB_OBJS)
292
+	$(Q)$(RANLIB) $@
280
 blib : $(BLIB)
293
 blib : $(BLIB)
281
 
294
 
282
 # Build an intermediate object file from the objects required for the
295
 # Build an intermediate object file from the objects required for the
283
 # specified target.
296
 # specified target.
284
 #
297
 #
285
 $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) 
298
 $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) 
286
-	$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
299
+	$(QM)echo "  [LD] $@"
300
+	$(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
287
 		-Map $(BIN)/$*.tmp.map
301
 		-Map $(BIN)/$*.tmp.map
288
-	$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
302
+	$(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
289
 
303
 
290
 # Show a linker map for the specified target
304
 # Show a linker map for the specified target
291
 #
305
 #

Loading…
Cancel
Save