Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # You will have to define environment variables corresponding to your system.
  2. ifdef GTCROOT
  3. TIGCC = $(GTCROOT)/tigcc_for_ide/tigcc
  4. LIBS = '$(shell $(TOTIGCCPATH) $(GTCROOT)/tigcc_for_ide/extgraph.a)'
  5. endif
  6. ifdef EXTGRAPH
  7. LIBS = $(EXTGRAPH)
  8. endif
  9. ifndef NOT_CYGWIN
  10. TOTIGCCPATH = cygpath -aw
  11. INCLUDES = -I'$(shell $(TOTIGCCPATH) $(GTCROOT)/base_dir)' -I'$(shell $(TOTIGCCPATH) .)'
  12. endif
  13. ifndef TIGCC
  14. TIGCC = tigcc
  15. endif
  16. SWITCHES = -W -Wall -Wno-unused -O2 -fno-strict-aliasing -mregparm=3 -DFORCE_SMALL_FONT
  17. all: bin/gtc-ide.89z bin/gtc-ide.9xz bin/gtc-ide.v2z
  18. superscratchclean:
  19. rm -f bin/*
  20. bin/gtc-ide.89z : calc = _89
  21. bin/gtc-ide.89z : ext = 89
  22. bin/gtc-ide.9xz : calc = _92
  23. bin/gtc-ide.9xz : ext = 9x
  24. bin/gtc-ide.v2z : calc = _92
  25. bin/gtc-ide.v2z : ext = v2
  26. bin/gtc-ide.89z bin/gtc-ide.9xz bin/gtc-ide.v2z: *.c *.h
  27. -mkdir tmp.ide$(ext)
  28. cp main.c sunpack.c tmp.ide$(ext)
  29. cd tmp.ide$(ext) && $(TIGCC) $(INCLUDES) $(SWITCHES) -D$(calc) -o gtc_ide main.c sunpack.c $(LIBS)
  30. cp tmp.ide$(ext)/gtc_ide.$(ext)z bin/gtc-ide.$(ext)z
  31. rm -rf tmp.ide$(ext)
  32. pedrom: bin/gtc-ide-pedrom.89z bin/gtc-ide-pedrom.9xz bin/gtc-ide-pedrom.v2z
  33. bin/gtc-ide-pedrom.89z : calc = _89
  34. bin/gtc-ide-pedrom.89z : ext = 89
  35. bin/gtc-ide-pedrom.9xz : calc = _92
  36. bin/gtc-ide-pedrom.9xz : ext = 9x
  37. bin/gtc-ide-pedrom.v2z : calc = _92
  38. bin/gtc-ide-pedrom.v2z : ext = v2
  39. bin/gtc-ide-pedrom.89z bin/gtc-ide-pedrom.9xz bin/gtc-ide-pedrom.v2z: *.c *.h
  40. -mkdir tmp.idepedrom$(ext)
  41. cp main.c sunpack.c tmp.idepedrom$(ext)
  42. cd tmp.idepedrom$(ext) && $(TIGCC) -DPEDROM $(INCLUDES) $(SWITCHES) -D$(calc) -o gtc_ide main.c sunpack.c $(LIBS)
  43. cp tmp.idepedrom$(ext)/gtc_ide.$(ext)z bin/gtc-ide-pedrom.$(ext)z
  44. rm -rf tmp.idepedrom$(ext)