Makefile.fpc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Makefile.fpc for Compiler units for IDE inclusion
  3. #
  4. [package]
  5. main=ide
  6. [require]
  7. packages=rtl rtl-extra
  8. [target]
  9. units=compunit
  10. [compiler]
  11. options=-Ur -dNOCATCH
  12. unitdir=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET) $(COMPILERDIR)/targets $(COMPILERDIR)/systems
  13. includedir=$(COMPILERDIR) $(COMPILERDIR)/$(PPC_TARGET)
  14. [install]
  15. fpcpackage=y
  16. [default]
  17. fpcdir=../../..
  18. [prerules]
  19. COMPILERDIR=$(FPCDIR)/compiler
  20. # Use 1.0.2 and 1.0.4 require -Ca to generate simple ppu
  21. ifneq ($(findstring 1.0.2,$(FPC_VERSION)),)
  22. override FPCOPT+=-Ca
  23. endif
  24. ifneq ($(findstring 1.0.4,$(FPC_VERSION)),)
  25. override FPCOPT+=-Ca
  26. endif
  27. # set default value for PPC_TARGET
  28. ifndef PPC_TARGET
  29. PPC_TARGET=$(CPU_TARGET)
  30. endif
  31. # do not add -d$(CPU_TARGET)
  32. override NOCPUDEF=1
  33. # Use PPC_TARGET instead
  34. override FPCOPT+= -d$(PPC_TARGET)
  35. # Add required defines
  36. override FPCOPT+=-dBrowserCol -dGDB
  37. ifeq ($(PPC_TARGET),i386)
  38. # the x86 dir doesn't hurt for 1.0.x though we could leave it away
  39. override FPCOPT+= -Fu$(COMPILERDIR)/x86
  40. #-dSUPPORT_MMX
  41. endif
  42. ifeq ($(PPC_TARGET),x86_64)
  43. override FPCOPT+= -Fu$(COMPILERDIR)/x86 -dNOOPT
  44. endif
  45. ifeq ($(PPC_TARGET),i8086)
  46. override FPCOPT+= -Fu$(COMPILERDIR)/x86
  47. endif
  48. ifeq ($(PPC_TARGET),powerpc)
  49. override FPCOPT+= -Fu$(COMPILERDIR)/ppcgen
  50. endif
  51. ifeq ($(PPC_TARGET),powerpc64)
  52. override FPCOPT+= -Fu$(COMPILERDIR)/ppcgen
  53. endif
  54. # mipsel specific
  55. ifeq ($(PPC_TARGET),mipsel)
  56. override FPCOPT+= -Fu$(COMPILERDIR)/mips
  57. endif
  58. # sparc specific
  59. ifeq ($(PPC_TARGET),sparc)
  60. override FPCOPT+= -Fu$(COMPILERDIR)/sparcgen -Fi$(COMPILERDIR)/sparcgen
  61. endif
  62. # sparc64 specific
  63. ifeq ($(PPC_TARGET),sparc64)
  64. override FPCOPT+= -Fu$(COMPILERDIR)/sparcgen -Fi$(COMPILERDIR)/sparcgen
  65. endif
  66. [rules]
  67. .NOTPARALLEL:
  68. .PHONY: compiler_ppuclean all clean install
  69. compiler_ppuclean:
  70. $(MAKE) -C $(COMPILERDIR) ppuclean
  71. all: compiler_ppuclean fpc_all
  72. clean: cleanall
  73. # Nothing to install
  74. install: