os161.uw-prog.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # Tools to generate files useful for debugging.
  2. # UW - TBB June 28, 2013
  3. # Added this ldscript to get data segment separated from the text segment
  4. # the way it was before we upgraded to the new version of the toolchain.
  5. # It moves the data segment to 0x10000000 and a few other minor things.
  6. # If it causes problems we should be able to just comment out this line.
  7. UWLDSCRIPT = -T $(TOP)/mk/uw-prog-ldscript
  8. EXTRAS = $(MYBUILDDIR)/$(PROG).readelf $(MYBUILDDIR)/$(PROG).nm \
  9. $(MYBUILDDIR)/$(PROG).objdump $(MYBUILDDIR)/$(PROG).asm
  10. extras: $(EXTRAS)
  11. echo:
  12. echo $(MYBUILDDIR)
  13. $(MYBUILDDIR)/$(PROG).readelf: $(PROG).c $(MYBUILDDIR)/$(PROG)
  14. cs350-readelf -a $(MYBUILDDIR)/$(PROG) > $(MYBUILDDIR)/$(PROG).readelf
  15. $(MYBUILDDIR)/$(PROG).objdump: $(PROG).c $(MYBUILDDIR)/$(PROG)
  16. cs350-objdump -s $(MYBUILDDIR)/$(PROG) > $(MYBUILDDIR)/$(PROG).objdump
  17. $(MYBUILDDIR)/$(PROG).asm: $(PROG).c $(MYBUILDDIR)/$(PROG)
  18. cs350-objdump -d $(MYBUILDDIR)/$(PROG) > $(MYBUILDDIR)/$(PROG).asm
  19. $(MYBUILDDIR)/$(PROG).nm: $(PROG).c $(MYBUILDDIR)/$(PROG)
  20. cs350-nm -n $(MYBUILDDIR)/$(PROG) > $(MYBUILDDIR)/$(PROG).nm
  21. clean:
  22. -/bin/rm $(EXTRAS)
  23. .PHONY: clean echo