Makefile.fpc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #
  2. # Makefile.fpc for WASI
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=
  8. units=system $(SYSINIT_UNITS) objpas wasiapi ctypes strings
  9. [require]
  10. nortl=y
  11. [install]
  12. fpcpackage=y
  13. [default]
  14. fpcdir=../..
  15. target=wasi
  16. cpu=wasm32
  17. [compiler]
  18. includedir=$(INC) $(PROCINC)
  19. sourcedir=$(INC) $(PROCINC) $(COMMON)
  20. [prerules]
  21. RTL=..
  22. INC=../inc
  23. COMMON=$(RTL)/common
  24. PROCINC=../$(CPU_TARGET)
  25. UNITPREFIX=rtl
  26. SYSTEMUNIT=system
  27. SYSINIT_UNITS=si_prc
  28. # Paths
  29. OBJPASDIR=$(RTL)/objpas
  30. # Insert exception handler in system unit
  31. ifdef EXCEPTIONS_IN_SYSTEM
  32. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  33. endif
  34. # Insert exception handler in system unit
  35. ifdef NO_EXCEPTIONS_IN_SYSTEM
  36. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  37. endif
  38. [rules]
  39. # Get the system independent include file names.
  40. # This will set the following variables :
  41. # SYSINCNAMES
  42. include $(INC)/makefile.inc
  43. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  44. # Get the processor dependent include file names.
  45. # This will set the following variables :
  46. # CPUINCNAMES
  47. include $(PROCINC)/makefile.cpu
  48. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  49. # Put system unit dependencies together.
  50. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  51. #
  52. # System Units (System, Objpas, Strings)
  53. #
  54. system$(PPUEXT) : system.pp $(SYSDEPS) wasiinc/wasitypes.inc wasiinc/wasiprocs.inc
  55. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp -Fiwasiinc
  56. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  57. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  58. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  59. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  60. $(SYSTEMUNIT)$(PPUEXT)
  61. $(COMPILER) $<
  62. #
  63. # $(SYSINIT_UNITS) Units
  64. #
  65. si_prc$(PPUEXT) : si_prc.pp $(SYSTEMUNIT)$(PPUEXT)
  66. $(COMPILER) $<
  67. #
  68. # Other $(SYSTEMUNIT)-dependent RTL Units
  69. #
  70. wasiapi$(PPUEXT) : wasiapi.pp wasiinc/wasitypes.inc wasiinc/wasiprocs.inc $(SYSTEMUNIT)$(PPUEXT)
  71. $(COMPILER) $< -Fiwasiinc
  72. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  73. $(COMPILER) $<