Makefile.fpc 5.2 KB

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