Makefile.fpc 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. #
  2. # Makefile.fpc for Free Pascal NDS RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=$(LOADERS)
  8. units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 extpas strings \
  9. # dos \
  10. sysutils \
  11. classes math typinfo ctypes \
  12. charset cpall getopts \
  13. types rtlconsts sysconst lineinfo fgl
  14. # exec timer doslib utility hardware inputevent graphics layers \
  15. # these can be moved to packages later
  16. # clipboard datatypes asl ahi tinygl get9 muihelper \
  17. #rsts=math rtlconsts varutils typinfo variants classes sysconst dateutil fpmkunit
  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. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. fpcdir=../..
  29. target=nds
  30. cpu=arm
  31. [compiler]
  32. includedir=$(INC) $(PROCINC)
  33. sourcedir=$(INC) $(PROCINC) $(COMMON)
  34. [prerules]
  35. RTL=..
  36. INC=$(RTL)/inc
  37. COMMON=$(RTL)/common
  38. PROCINC=$(RTL)/$(CPU_TARGET)
  39. UNITPREFIX=rtl
  40. SYSTEMUNIT=system
  41. LOADERS=prt07 prt09 cprt07 cprt09
  42. ifdef RELEASE
  43. override FPCOPT+=-Ur
  44. endif
  45. # Paths
  46. OBJPASDIR=$(RTL)/objpas
  47. GRAPHDIR=$(INC)/graph
  48. [rules]
  49. .NOTPARALLEL:
  50. # Get the system independent include file names.
  51. # This will set the following variables :
  52. # SYSINCNAMES
  53. include $(INC)/makefile.inc
  54. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  55. # Get the processor dependent include file names.
  56. # This will set the following variables :
  57. # CPUINCNAMES
  58. include $(PROCINC)/makefile.cpu
  59. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  60. # Put system unit dependencies together.
  61. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  62. #
  63. # Loaders
  64. #
  65. prt07$(OEXT) : prt07.as
  66. $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)prt07$(OEXT) prt07.as
  67. prt09$(OEXT) : prt09.as
  68. $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)prt09$(OEXT) prt09.as
  69. cprt07$(OEXT) : cprt07.as
  70. $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)cprt07$(OEXT) cprt07.as
  71. cprt09$(OEXT) : cprt09.as
  72. $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)cprt09$(OEXT) cprt09.as
  73. #
  74. # Base Units (System, strings, os-dependent-base-unit)
  75. #
  76. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS) $(INC)/softfpu.pp
  77. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg @rtl.cfg $(SYSTEMUNIT).pp $(REDIR)
  78. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  79. $(COMPILER) $(INC)/uuchar.pp
  80. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  81. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  82. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  83. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  84. $(SYSTEMUNIT)$(PPUEXT)
  85. $(COMPILER) $(INC)/strings.pp
  86. iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  87. $(COMPILER) $(INC)/iso7185.pp
  88. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. $(COMPILER) $(INC)/extpas.pp
  90. #
  91. # System Dependent Units
  92. #
  93. #ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. #doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  95. #
  96. # TP7 Compatible RTL Units
  97. #
  98. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  99. $(SYSTEMUNIT)$(PPUEXT)
  100. #printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
  101. #graph$(PPUEXT) : graph.pp
  102. #
  103. # Delphi Compatible Units
  104. #
  105. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  106. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
  107. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  108. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  109. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) \
  110. fgl$(PPUEXT)
  111. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  112. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  113. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  114. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  115. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  116. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  117. $(COMPILER) $(OBJPASDIR)/types.pp
  118. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp
  119. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  120. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  121. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  122. fgl$(PPUEXT): $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  123. $(COMPILER) -Sg $(OBJPASDIR)/fgl.pp $(REDIR)
  124. #
  125. # Mac Pascal Model
  126. #
  127. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  128. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  129. #
  130. # Other system-independent RTL Units
  131. #
  132. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) $(INC)/getopts.pp
  134. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  135. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  136. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  137. $(COMPILER) $(INC)/lineinfo.pp
  138. #lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  139. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  140. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  141. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  142. #
  143. # Other system-dependent RTL Units
  144. #
  145. exec$(PPUEXT) : exec.pp execf.inc execd.inc
  146. timer$(PPUEXT) : timer.pp timerd.inc timerf.inc
  147. utility$(PPUEXT) : utility.pp exec$(PPUEXT) utilf.inc utild1.inc utild2.inc
  148. doslib$(PPUEXT) : doslib.pp exec$(PPUEXT) timer$(PPUEXT) doslibd.inc doslibf.inc
  149. hardware$(PPUEXT): hardware.pas exec$(PPUEXT)
  150. inputevent$(PPUEXT): inputevent.pas exec$(PPUEXT) timer$(PPUEXT) utility$(PPUEXT)
  151. graphics$(PPUEXT): graphics.pas exec$(PPUEXT) utility$(PPUEXT) hardware$(PPUEXT)
  152. layers$(PPUEXT) : layers.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT)
  153. intuition$(PPUEXT): intuition.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT) \
  154. inputevent$(PPUEXT) timer$(PPUEXT) layers$(PPUEXT)
  155. aboxlib$(PPUEXT): aboxlib.pas
  156. clipboard$(PPUEXT): clipboard.pas exec$(PPUEXT)
  157. datatype$(PPUEXT): datatypes.pas exec$(PPUEXT) doslib$(PPUEXT) intuition$(PPUEXT) \
  158. utility$(PPUEXT) graphics$(PPUEXT)
  159. asl$(PPUEXT): asl.pas exec$(PPUEXT) graphics$(PPUEXT) utility$(PPUEXT)
  160. ahi$(PPUEXT): ahi.pas exec$(PPUEXT) utility$(PPUEXT)
  161. mui$(PPUEXT): mui.pas exec$(PPUEXT) utility$(PPUEXT) intuition$(PPUEXT) graphics$(PPUEXT)
  162. tinygl$(PPUEXT): tinygl.pp exec$(PPUEXT)
  163. get9$(PPUEXT): get9.pas exec$(PPUEXT)
  164. muihelper$(PPUEXT): muihelper.pas intuition$(PPUEXT) mui$(PPUEXT) doslib$(PPUEXT) utility$(PPUEXT)
  165. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  166. $(COMPILER) $(INC)/ctypes.pp