Makefile.fpc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #
  2. # Makefile.fpc for Free Pascal MacOS RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=
  8. units=system uuchar strings objpas iso7185 heaptrc getopts macostp macutils \
  9. unixutil dos extpas cmem charset cpall ctypes sysconst \
  10. softfpu macpas
  11. # sysutils
  12. # macpas \
  13. # exec \
  14. # printer \
  15. # lineinfo lnfodwrf graph \
  16. # math typinfo
  17. # rsts=math
  18. # implicitunits=exeinfo \
  19. implicitunits=cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  20. cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
  21. cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
  22. cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
  23. cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u
  24. rsts=sysconst
  25. # math typinfo sysconst rtlconsts
  26. [require]
  27. nortl=y
  28. [install]
  29. fpcpackage=y
  30. [default]
  31. fpcdir=../..
  32. target=macos
  33. [compiler]
  34. includedir=$(INC) $(PROCINC)
  35. sourcedir=$(INC) $(PROCINC) $(COMMON)
  36. [prerules]
  37. RTL=..
  38. INC=../inc
  39. PROCINC=../$(CPU_TARGET)
  40. PPUEXT=pput
  41. ASMEXT=.s
  42. UNITPREFIX=rtl
  43. SYSTEMUNIT=system
  44. # Use new feature from 1.0.5 version
  45. # that generates release PPU files
  46. # which will not be recompiled
  47. ifdef RELEASE
  48. ifeq ($(findstring 1.0.2,$(FPC_VERSION)),)
  49. ifeq ($(findstring 1.0.4,$(FPC_VERSION)),)
  50. override FPCOPT+=-Ur
  51. endif
  52. endif
  53. endif
  54. # Paths
  55. OBJPASDIR=$(RTL)/objpas
  56. GRAPHDIR=$(INC)/graph
  57. [rules]
  58. .NOTPARALLEL:
  59. # Get the system independent include file names.
  60. # This will set the following variables :
  61. # SYSINCNAMES
  62. include $(INC)/makefile.inc
  63. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  64. # Get the processor dependent include file names.
  65. # This will set the following variables :
  66. # CPUINCNAMES
  67. include $(PROCINC)/makefile.cpu
  68. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  69. # Put system unit dependencies together.
  70. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  71. #
  72. # Loaders
  73. #
  74. #prt0$(OEXT) : prt0$(LOADEREXT)
  75. # -$(AS) prt0$(LOADEREXT) -o prt0$(OEXT)
  76. #gprt0$(OEXT) : $(GLOADERAS)
  77. # -$(AS) $(GLOADERAS) -o gprt0$(OEXT)
  78. #
  79. # Base Units (System, strings, os-dependent-base-unit)
  80. #
  81. system$(PPUEXT) : system.pp $(SYSDEPS)
  82. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp $(REDIR)
  83. strings$(PPUEXT) : $(INC)/strings.pp system$(PPUEXT)
  84. $(COMPILER) $(INC)/strings.pp $(REDIR)
  85. #exec$(PPUEXT) : exec.pp exec.inc system$(PPUEXT)
  86. # $(COMPILER) exec $(REDIR)
  87. #
  88. # Delphi Object Model
  89. #
  90. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  91. $(COMPILER) $(INC)/uuchar.pp
  92. objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp system$(PPUEXT)
  93. $(COPY) $(OBJPASDIR)/objpas.pp .
  94. $(COMPILER) objpas $(REDIR)
  95. $(DEL) objpas.pp
  96. sysutils$(PPUEXT) : sysutils.pp objpas$(PPUEXT) system$(PPUEXT) sysconst$(PPUEXT) macostp$(PPUEXT) macutils$(PPUEXT)
  97. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  98. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) softfpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  99. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  100. softfpu$(PPUEXT) : $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  101. $(COMPILER) $(INC)/softfpu.pp
  102. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  103. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  104. #
  105. # Mac Pascal Model
  106. #
  107. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  108. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  109. #
  110. # System Dependent Units
  111. #
  112. #
  113. # TP7 Compatible RTL Units
  114. #
  115. dos$(PPUEXT) : $(DOSDEPS) unixutil$(PPUEXT) system$(PPUEXT)
  116. $(COMPILER) dos $(REDIR)
  117. #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT)
  118. # $(COMPILER) crt $(REDIR)
  119. #printer$(PPUEXT) : printer.pp system$(PPUEXT)
  120. # $(COMPILER) printer $(REDIR)
  121. #
  122. # Other system-independent RTL Units
  123. #
  124. iso7185$(PPUEXT) : $(INC)/iso7185.pp heaptrc$(PPUEXT)
  125. $(COMPILER) $(INC)/iso7185.pp
  126. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  127. $(COMPILER) $(INC)/extpas.pp
  128. getopts$(PPUEXT) : $(INC)/getopts.pp strings$(PPUEXT) system$(PPUEXT)
  129. $(COMPILER) $(INC)/getopts.pp $(REDIR)
  130. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  131. $(COMPILER) $(INC)/heaptrc.pp $(REDIR)
  132. unixutil$(PPUEXT) : ../unix/unixutil.pp
  133. $(COMPILER) ../unix/unixutil.pp $(REDIR)
  134. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  135. $(COMPILER) $(INC)/charset.pp
  136. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  137. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  138. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  139. $(COMPILER) $(INC)/cmem.pp
  140. ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)
  141. $(COMPILER) $(INC)/ctypes.pp
  142. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  143. $(COMPILER) $(OBJPASDIR)/math.pp