Makefile.fpc 5.8 KB

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