Makefile.fpc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Makefile.fpc for Compiler units for IDE inclusion
  3. #
  4. [package]
  5. main=ide
  6. [require]
  7. packages=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. [rules]
  59. .NOTPARALLEL:
  60. .PHONY: compiler_ppuclean all clean install
  61. compiler_ppuclean:
  62. $(MAKE) -C $(COMPILERDIR) ppuclean
  63. all: compiler_ppuclean fpc_all
  64. clean: cleanall
  65. # Nothing to install
  66. install: