Makefile.fpc 6.6 KB

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