Makefile.fpc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. sortbase softfpu macpas classes fgl types
  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. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  105. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) \
  106. sysconst$(PPUEXT) fgl$(PPUEXT) sortbase$(PPUEXT)
  107. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  108. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT) sortbase$(PPUEXT)
  109. $(COMPILER) $(OBJPASDIR)/fgl.pp
  110. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  111. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  112. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  113. $(COMPILER) $(OBJPASDIR)/math.pp
  114. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  115. $(COMPILER) $(OBJPASDIR)/types.pp
  116. #
  117. # Mac Pascal Model
  118. #
  119. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  120. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  121. #
  122. # System Dependent Units
  123. #
  124. #
  125. # TP7 Compatible RTL Units
  126. #
  127. dos$(PPUEXT) : $(DOSDEPS) unixutil$(PPUEXT) system$(PPUEXT)
  128. $(COMPILER) dos $(REDIR)
  129. #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT)
  130. # $(COMPILER) crt $(REDIR)
  131. #printer$(PPUEXT) : printer.pp system$(PPUEXT)
  132. # $(COMPILER) printer $(REDIR)
  133. #
  134. # Other system-independent RTL Units
  135. #
  136. iso7185$(PPUEXT) : $(INC)/iso7185.pp heaptrc$(PPUEXT)
  137. $(COMPILER) $(INC)/iso7185.pp
  138. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  139. $(COMPILER) $(INC)/extpas.pp
  140. getopts$(PPUEXT) : $(INC)/getopts.pp strings$(PPUEXT) system$(PPUEXT)
  141. $(COMPILER) $(INC)/getopts.pp $(REDIR)
  142. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  143. $(COMPILER) $(INC)/heaptrc.pp $(REDIR)
  144. unixutil$(PPUEXT) : ../unix/unixutil.pp
  145. $(COMPILER) ../unix/unixutil.pp $(REDIR)
  146. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  147. $(COMPILER) $(INC)/charset.pp
  148. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  149. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  150. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  151. $(COMPILER) $(INC)/cmem.pp
  152. ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)
  153. $(COMPILER) $(INC)/ctypes.pp
  154. sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  155. $(COMPILER) $<