Makefile.fpc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #
  2. # Makefile.fpc for Free Pascal Compiler Utils
  3. #
  4. [target]
  5. programs=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
  6. rst=fpcsubst
  7. [clean]
  8. units=ppu crc
  9. [compiler]
  10. unitdir=..
  11. sourcedir=..
  12. [install]
  13. fpcpackage=y
  14. [require]
  15. tools=data2inc
  16. [default]
  17. fpcdir=../..
  18. [shared]
  19. build=n
  20. [prerules]
  21. ifdef OPTNEW
  22. override FPCOPT+=$(OPTNEW)
  23. endif
  24. [rules]
  25. #
  26. # PPU Tools
  27. #
  28. # not parallel because systems using an external linker will get conflicts
  29. # due to overwriting each other's link.res file
  30. .NOTPARALLEL:
  31. REG_SOURCES=$(wildcard *reg.pp)
  32. REG_EXES=$(subst .pp,$(EXEEXT),$(REG_SOURCES))
  33. ifndef NOCPUDEF
  34. ppu$(PPUEXT): ../ppu.pas
  35. $(MAKE) ppu$(PPUEXT) NOCPUDEF=1
  36. ppudump$(EXEEXT): ppuutils/ppudump.pp ppu$(PPUEXT)
  37. $(MAKE) ppudump$(EXEEXT) NOCPUDEF=1
  38. ppufiles$(EXEEXT): ppufiles.pp ppu$(PPUEXT)
  39. $(MAKE) ppufiles$(EXEEXT) NOCPUDEF=1
  40. ppumove$(EXEEXT): ppumove.pp ppu$(PPUEXT)
  41. $(MAKE) ppumove$(EXEEXT) NOCPUDEF=1
  42. else
  43. ppu$(PPUEXT): ../ppu.pas
  44. $(COMPILER) ../ppu.pas -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
  45. ppudump$(EXEEXT): ppuutils/ppudump.pp ppu$(PPUEXT)
  46. $(COMPILER) ppuutils/ppudump.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
  47. ppufiles$(EXEEXT): ppufiles.pp ppu$(PPUEXT)
  48. $(COMPILER) ppufiles.pp -Fu../generic -dGENERIC_CPU -Fi..
  49. ppumove$(EXEEXT): ppumove.pp ppu$(PPUEXT)
  50. $(COMPILER) ppumove.pp -Fu../generic -dGENERIC_CPU -Fi..
  51. endif
  52. msg2inc$(EXEEXT): $(COMPILER_UNITTARGETDIR) msg2inc.pp
  53. gppc386$(EXEEXT): $(COMPILER_UNITTARGETDIR) gppc386.pp
  54. fpcsubst$(EXEEXT): fpcsubst.pp usubst.pp
  55. fpcmkcfg$(EXEEXT): fpcmkcfg.pp usubst.pp fpccfg.inc fpcfg.inc fpini.inc
  56. ifneq ($(DATA2INC),)
  57. fpccfg.inc: fpc.cft
  58. $(DATA2INC) -b -s fpc.cft fpccfg.inc DefaultConfig
  59. fpcfg.inc : fpinc.cfg
  60. $(DATA2INC) -b -s fpinc.cfg fpcfg.inc fpcfg
  61. fpini.inc : fpinc.ini
  62. $(DATA2INC) -b -s fpinc.ini fpini.inc fpini
  63. endif
  64. reg_exes: $(COMPILER_UNITTARGETDIR)
  65. $(MAKE) $(REG_EXES)
  66. #
  67. # Don't export some tools, which are found in the current dir if it's in
  68. # the path, so are not valid for the subdirs
  69. #
  70. unexport PPUFILES PPUMOVE