mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-23 01:51:58 +00:00
Made most of the build much quieter
This commit is contained in:
parent
413c554b34
commit
6ce5c97981
12
src/Makefile
12
src/Makefile
@ -115,15 +115,15 @@ $(BIN)/%.flags :
|
||||
# Rules for specific object types.
|
||||
#
|
||||
COMPILE_c = $(CC) $(CFLAGS) $(CFLAGS_c) $(OBJ_CFLAGS)
|
||||
RULE_c = $(COMPILE_c) -c $< -o $@
|
||||
RULE_c_to_dbg%.o = $(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
|
||||
RULE_c_to_c = $(COMPILE_c) -E -c $< > $@
|
||||
RULE_c_to_s = $(COMPILE_c) -S -g0 -c $< -o $@
|
||||
RULE_c = $(Q)$(COMPILE_c) -c $< -o $@
|
||||
RULE_c_to_dbg%.o = $(Q)$(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
|
||||
RULE_c_to_c = $(Q)$(COMPILE_c) -E -c $< > $@
|
||||
RULE_c_to_s = $(Q)$(COMPILE_c) -S -g0 -c $< -o $@
|
||||
|
||||
PREPROCESS_S = $(CPP) $(CFLAGS) $(CFLAGS_S) $(OBJ_CFLAGS)
|
||||
ASSEMBLE_S = $(AS) $(ASFLAGS)
|
||||
RULE_S = $(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
|
||||
RULE_S_to_s = $(PREPROCESS_S) $< > $@
|
||||
RULE_S = $(Q)$(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
|
||||
RULE_S_to_s = $(Q)$(PREPROCESS_S) $< > $@
|
||||
|
||||
DEBUG_TARGETS += dbg%.o c s
|
||||
|
||||
|
@ -39,6 +39,16 @@ version :
|
||||
@$(TOUCH) $@
|
||||
VERYCLEANUP += .toolcheck
|
||||
|
||||
# Build verbosity
|
||||
#
|
||||
ifeq ($(V),1)
|
||||
Q =
|
||||
QM = @\#
|
||||
else
|
||||
Q = @
|
||||
QM = @
|
||||
endif
|
||||
|
||||
# Check for an old version of gas (binutils 2.9.1)
|
||||
#
|
||||
OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
|
||||
@ -111,11 +121,13 @@ define obj_template
|
||||
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
|
||||
-M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
|
||||
@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
||||
'\n\t$$(QM)echo " [BUILD] $$@"\n' \
|
||||
'\n\t$$(RULE_$(3))\n' \
|
||||
'\nBOBJS += $$(BIN)/$(4).o\n' \
|
||||
$(foreach TGT,$(DEBUG_TARGETS), \
|
||||
$(if $(RULE_$(3)_to_$(TGT)), \
|
||||
'\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
|
||||
'\n\t$$(QM)echo " [BUILD] $$@"\n' \
|
||||
'\n\t$$(RULE_$(3)_to_$(TGT))\n' \
|
||||
'\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
|
||||
'\n$(2) : $$($(4)_DEPS)\n' \
|
||||
@ -274,18 +286,20 @@ VERYCLEANUP += $(BLIB_LIST)
|
||||
#
|
||||
BLIB = $(BIN)/blib.a
|
||||
$(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
|
||||
$(RM) $(BLIB)
|
||||
$(AR) r $@ $(BLIB_OBJS)
|
||||
$(RANLIB) $@
|
||||
$(Q)$(RM) $(BLIB)
|
||||
$(QM)echo " [AR] $@"
|
||||
$(Q)$(AR) r $@ $(BLIB_OBJS)
|
||||
$(Q)$(RANLIB) $@
|
||||
blib : $(BLIB)
|
||||
|
||||
# Build an intermediate object file from the objects required for the
|
||||
# specified target.
|
||||
#
|
||||
$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
|
||||
$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
|
||||
$(QM)echo " [LD] $@"
|
||||
$(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
|
||||
-Map $(BIN)/$*.tmp.map
|
||||
$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
|
||||
$(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
|
||||
|
||||
# Show a linker map for the specified target
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user