Makefile 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # TI-68k Developer Utilities Makefile
  2. # Copyright (C) 2009, Lionel Debroux
  3. ifeq ($(OSTYPE), msys)
  4. EXEEXT = .exe
  5. else
  6. EXEEXT =
  7. endif
  8. CC ?= gcc
  9. CFLAGS = -Os -s -fno-exceptions -pipe -Wall -W -Wwrite-strings -Wp,-D_FORTIFY_SOURCE=2
  10. all: setup ttbin2hex ttbin2oth ttbin2str ttextract ttstrip ttarchive ttpack ttunpack ttdos2ebk tthelp ttinfo ttebkgen ttchecksum ttbin2bin ttsplit ttppggen tttiler ttunebk ttunarchive tthex2bin ttsetname
  11. ttbin2hex ttbin2oth ttbin2str ttextract ttstrip ttarchive ttpack ttunpack ttdos2ebk tthelp ttinfo ttebkgen ttchecksum ttbin2bin ttsplit ttppggen tttiler ttunebk ttunarchive tthex2bin ttsetname: $?
  12. $(CC) $@.c -o bin/$@ $^ $(CFLAGS) $(WARN_CFLAGS)
  13. clean:
  14. rm -Rf bin
  15. setup:
  16. mkdir -p bin
  17. docs:
  18. echo "#############################################################################" > tooldocs.txt
  19. echo "SHORT USAGE INFORMATION of included PCTOOLS " >> tooldocs.txt
  20. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  21. echo "NOTE: tooldocs.txt will be automatically generated by calling each tool " >> tooldocs.txt
  22. echo " without any commandline parameter. " >> tooldocs.txt
  23. echo " Don't modify this document by hand. You will loose your changes " >> tooldocs.txt
  24. echo " when `make docs` will be run again " >> tooldocs.txt
  25. echo "#############################################################################" >> tooldocs.txt
  26. bin/ttarchive$(EXEEXT) >> tooldocs.txt || true
  27. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  28. bin/ttbin2str$(EXEEXT) >> tooldocs.txt || true
  29. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  30. bin/ttbin2hex$(EXEEXT) >> tooldocs.txt || true
  31. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  32. bin/ttbin2oth$(EXEEXT) >> tooldocs.txt || true
  33. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  34. bin/ttbin2bin$(EXEEXT) >> tooldocs.txt || true
  35. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  36. bin/ttchecksum$(EXEEXT) >> tooldocs.txt || true
  37. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  38. bin/ttdos2ebk$(EXEEXT) >> tooldocs.txt || true
  39. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  40. bin/ttebkgen$(EXEEXT) >> tooldocs.txt || true
  41. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  42. bin/ttextract$(EXEEXT) >> tooldocs.txt || true
  43. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  44. bin/ttinfo$(EXEEXT) >> tooldocs.txt || true
  45. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  46. bin/ttpack$(EXEEXT) >> tooldocs.txt || true
  47. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  48. bin/ttppggen$(EXEEXT) >> tooldocs.txt || true
  49. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  50. bin/ttsetname$(EXEEXT) >> tooldocs.txt || true
  51. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  52. bin/ttsplit$(EXEEXT) >> tooldocs.txt || true
  53. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  54. bin/ttstrip$(EXEEXT) >> tooldocs.txt || true
  55. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  56. bin/tttiler$(EXEEXT) >> tooldocs.txt || true
  57. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  58. bin/ttunarchive$(EXEEXT) >> tooldocs.txt || true
  59. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  60. bin/ttunebk$(EXEEXT) >> tooldocs.txt || true
  61. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  62. bin/ttunpack$(EXEEXT) >> tooldocs.txt || true
  63. echo "-----------------------------------------------------------------------------" >> tooldocs.txt
  64. echo tooldocs.txt generated.