2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 07:11:32 +00:00

"make xxx DEBUG=yyy,zzz" now working, but the "up to date" message is

getting suppressed.  :(
This commit is contained in:
Michael Brown 2005-04-18 13:55:57 +00:00
parent a245c93417
commit 1cdb68d116

View File

@ -158,13 +158,6 @@ $(BIN)/NIC : $(AUTO_DEPS)
@perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@
CLEANUP += $(BIN)/NIC
# Library of all objects
#
$(BLIB) : $(BOBJS)
$(AR) r $@ $(BOBJS)
$(RANLIB) $@
blib : $(BLIB)
# Analyse a target name (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and
# derive the variables:
#
@ -232,10 +225,9 @@ TGT_MAKEROM_FLAGS = $(strip $(MAKEROM_FLAGS_$(TGT_ROM_NAME)) \
# the target.
#
COMMA := ,
DEBUG_OBJECTS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).dbg.o)
$(foreach OBJ,$(filter-out $(dbg.o_OBJS),$(DEBUG_OBJECTS)), \
$(error $(OBJ) is not a valid debug object) \
)
DEBUG_OBJS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).dbg.o)
DEBUG_REPLACE_OBJS = $(foreach D,$(subst $(COMMA), ,$(DEBUG)),$(BIN)/$(D).o)
BLIB_OBJS = $(DEBUG_OBJS) $(filter-out $(DEBUG_ORIG_OBJS),$(BOBJS))
# Print out all derived information for a given target.
#
@ -258,25 +250,33 @@ $(BIN)/%.info :
@echo
@echo 'makerom target flags : $(TGT_MAKEROM_FLAGS)'
@echo
@echo 'Debugging objects : $(DEBUG_OBJECTS)'
@echo 'Debugging objects : $(DEBUG_OBJS)'
@echo 'Replaced objects : $(DEBUG_REPLACE_OBJS)'
# List of objects included in the last build of blib. This is needed
# in order to correctly rebuild blib whenever the list of objects
# changes.
#
BLIB_LIST = $(BIN)/.blib.list
.PHONY : always_check_blib_list
$(BLIB_LIST) : always_check_blib_list
@[ "$(shell cat $@)" = "$(BLIB_OBJS)" ] || echo "$(BLIB_OBJS)" > $@
.SECONDARY : $(BLIB_LIST)
# Library of all objects
#
BLIB = $(BIN)/blib.a
$(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
$(AR) r $@ $(BLIB_OBJS)
$(RANLIB) $@
blib : $(BLIB)
# Build an intermediate object file from the objects required for the
# specified target.
#
# If it's a debugging version, force a link to take place by making
# this target depend on a phony target, and mark the resulting files
# as being older than BLIB (and prevent them from being deleted), so
# that any subsequent images will do a fresh link. Otherwise, you
# won't get what you expect when you do e.g. "make DEBUG=pci
# bin/pnic.dsk ; make bin/pnic.dsk ; make DEBUG=pci bin/pnic.dsk"
#
$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) \
$(DEBUG_OBJECTS) $(if $(DEBUG),force_relink)
$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) \
$(DEBUG_OBJECTS) $(BLIB) -o $@ -Map $(BIN)/$*.tmp.map
$(if $(DEBUG_OBJECTS),$(TOUCH) -r $(BLIB) -B 2 $@ $(BIN)/$*.tmp.map)
.PHONY : force_relink
.SECONDARY :
$(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT)
$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
-Map $(BIN)/$*.tmp.map
# Show a linker map for the specified target
#