Makefile.fpc 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. #
  2. # Makefile.fpc for Free Pascal Darwin RTL
  3. #
  4. [package]
  5. main=rtl
  6. # disabled units: serial
  7. [target]
  8. loaders=
  9. units=$(SYSTEMUNIT) sysinit uuchar unixtype ctypes objpas macpas iso7185 extpas \
  10. strings sysctl baseunix unixutil \
  11. unix initc cmem dynlibs $(CPU_UNITS) \
  12. dos dl blockrtl \
  13. sysutils typinfo fgl classes math types \
  14. charset cpall character getopts heaptrc lineinfo lnfodwrf lnfogdb \
  15. errors termio \
  16. sysconst cthreads rtlconsts cwstring bsd fpwidestring \
  17. fpintres fpextres objc objcbase unixcp
  18. implicitunits=exeinfo \
  19. cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  20. cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852 \
  21. unicodedata unicodenumtable
  22. rsts=math typinfo classes sysconst rtlconsts
  23. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. fpcdir=../..
  29. target=darwin
  30. [compiler]
  31. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(OSPROCINC)
  32. sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(COMMON)
  33. [lib]
  34. libname=libfprtl.so
  35. libversion=2.0.0
  36. libunits=$(SYSTEMUNIT) objpas strings \
  37. unix \
  38. dos crt objects \
  39. sysutils typinfo math \
  40. cpu mmx getopts heaptrc \
  41. errors
  42. [prerules]
  43. ifeq ($(CPU_TARGET),i386)
  44. CPU_UNITS=mmx cpu
  45. endif
  46. ifeq ($(ARCH),x86_64)
  47. CPU_UNITS=cpu
  48. endif
  49. RTL=..
  50. INC=$(RTL)/inc
  51. COMMON=$(RTL)/common
  52. PROCINC=$(RTL)/$(CPU_TARGET)
  53. BSDINC=$(RTL)/bsd
  54. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  55. OSPROCINC=$(RTL)/darwin/$(CPU_TARGET)
  56. UNIXINC=$(RTL)/unix
  57. UNITPREFIX=rtl
  58. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  59. SYSTEMUNIT=system
  60. override FPCOPT+=-dNOMOUSE
  61. else
  62. SYSTEMUNIT="Error: Darwin is not supported for 1.0"
  63. endif
  64. # Use new feature from 1.0.5 version
  65. # that generates release PPU files
  66. # which will not be recompiled
  67. ifdef RELEASE
  68. override FPCOPT+=-Ur
  69. endif
  70. # Darwin requires libc, no syscalls
  71. override FPCOPT+=-dFPC_USE_LIBC
  72. # Paths
  73. OBJPASDIR=$(RTL)/objpas
  74. GRAPHDIR=$(INC)/graph
  75. # Use new graph unit ?
  76. # NEWGRAPH=YES
  77. # Use LibGGI ?
  78. # Use
  79. #
  80. ifndef USELIBGGI
  81. USELIBGGI=NO
  82. endif
  83. [rules]
  84. # Get the system independent include file names.
  85. # This will set the following variables :
  86. # SYSINCNAMES
  87. include $(INC)/makefile.inc
  88. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  89. # Get the processor dependent include file names.
  90. # This will set the following variables :
  91. # CPUINCNAMES
  92. include $(PROCINC)/makefile.cpu
  93. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  94. # Put system unit dependencies together.
  95. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  96. #
  97. # System Units (System, Objpas, Strings)
  98. #
  99. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp $(SYSDEPS)
  100. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  101. sysinit$(PPUEXT) : sysinit.pas $(SYSTEMUNIT)$(PPUEXT)
  102. $(COMPILER) $<
  103. uuchar$(PPUEXT): $(INC)/uuchar.pp $(SYSTEMUNIT)$(PPUEXT)
  104. $(COMPILER) $<
  105. fpintres$(PPUEXT): $(INC)/fpintres.pp $(SYSTEMUNIT)$(PPUEXT)
  106. $(COMPILER) $<
  107. fpextres$(PPUEXT): $(INC)/fpextres.pp $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT)
  108. $(COMPILER) $<
  109. iso7185$(PPUEXT): $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  110. $(COMPILER) $(INC)/iso7185.pp
  111. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  112. $(COMPILER) $(INC)/extpas.pp
  113. objpas$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  114. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  115. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  116. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  117. $(SYSTEMUNIT)$(PPUEXT)
  118. $(COMPILER) $<
  119. objc$(PPUEXT) : $(INC)/objc.pp $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) unixtype$(PPUEXT) $(INC)/objc.pp $(INC)/objc1.inc $(INC)/objcnf.inc
  120. $(COMPILER) $<
  121. objcbase$(PPUEXT) : $(INC)/objcbase.pp $(SYSTEMUNIT)$(PPUEXT) $(INC)/objcbase.pp objc$(PPUEXT)
  122. $(COMPILER) $<
  123. blockrtl$(PPUEXT) : $(INC)/blockrtl.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) initc$(PPUEXT) ctypes$(PPUEXT) $(INC)/blockrtl.pp
  124. $(COMPILER) $<
  125. #
  126. # System Dependent Units
  127. #
  128. baseunix$(PPUEXT) : $(UNIXINC)/baseunix.pp unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
  129. signal.inc $(UNIXINC)/bunxh.inc \
  130. $(BSDINC)/bunxsysc.inc \
  131. $(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
  132. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) $<
  134. unixtype$(PPUEXT) : $(UNIXINC)/unixtype.pp $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
  135. $(COMPILER) $<
  136. unix$(PPUEXT) : $(UNIXINC)/unix.pp unixtype$(PPUEXT) baseunix$(PPUEXT) unixutil$(PPUEXT) strings$(PPUEXT) $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  137. unxconst.inc $(UNIXINC)/timezone.inc \
  138. unxfunc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  139. $(COMPILER) $<
  140. unixutil$(PPUEXT) : $(UNIXINC)/unixutil.pp $(SYSTEMUNIT)$(PPUEXT)
  141. $(COMPILER) $<
  142. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas dl$(PPUEXT) objpas$(PPUEXT) rtlconsts$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT)
  143. $(COMPILER) $<
  144. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
  145. $(COMPILER) $<
  146. unixcp$(PPUEXT) : $(UNIXINC)/unixcp.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) baseunix$(PPUEXT)
  147. $(COMPILER) $(UNIXINC)/unixcp.pp
  148. #
  149. # TP7 Compatible RTL Units
  150. #
  151. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  152. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  153. $(COMPILER) $<
  154. #
  155. # Graph
  156. #
  157. #
  158. # Delphi Compatible Units
  159. #
  160. sysutils$(PPUEXT) : objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT) $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  161. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
  162. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  163. classes$(PPUEXT) : sysutils$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) typinfo$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  164. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
  165. $(COMPILER) -Fi$(OBJPASDIR)/classes $(UNIXINC)/classes.pp
  166. typinfo$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconsts$(PPUEXT)
  167. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  168. # let it depend on buildcollations to prevent simultaneous building of unicodedata
  169. character$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/character.pas objpas$(PPUEXT) rtlconsts$(PPUEXT)
  170. $(COMPILER) $(OBJPASDIR)/character.pas
  171. math$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  172. $(COMPILER) $(OBJPASDIR)/math.pp
  173. gettext$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  174. $(COMPILER) $(OBJPASDIR)/gettext.pp
  175. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  176. $(COMPILER) $(OBJPASDIR)/types.pp
  177. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  178. $(COMPILER) $(OBJPASDIR)/fgl.pp
  179. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  180. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  181. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  182. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  183. #
  184. # Mac Pascal Model
  185. #
  186. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  187. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  188. #
  189. # Other system-independent RTL Units
  190. #
  191. ifneq ($(findstring $(ARCH),x86_64 i386),)
  192. cpu$(PPUEXT) : $(PROCINC)/cpu.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT)
  193. else
  194. cpu$(PPUEXT) : $(PROCINC)/cpu.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  195. endif
  196. $(COMPILER) $<
  197. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  198. $(COMPILER) $<
  199. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  200. $(COMPILER) $<
  201. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  202. $(COMPILER) -Sg $(INC)/heaptrc.pp
  203. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) $(INC)/exeinfo.pp sysutils$(PPUEXT)
  204. $(COMPILER) $<
  205. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) $(INC)/exeinfo.pp lineinfo$(PPUEXT) sysutils$(PPUEXT)
  206. $(COMPILER) $<
  207. lnfogdb$(PPUEXT) : $(UNIXINC)/lnfogdb.pp $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT)
  208. $(COMPILER) $<
  209. charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
  210. $(COMPILER) $<
  211. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  212. $(COMPILER) $<
  213. fpwidestring$(PPUEXT): $(OBJPASDIR)/fpwidestring.pp character$(PPUEXT) unixcp$(PPUEXT)
  214. $(COMPILER) $<
  215. #
  216. # Other system-dependent RTL Units
  217. #
  218. termio$(PPUEXT) : termio.pp baseunix$(PPUEXT)
  219. $(COMPILER) $<
  220. dl$(PPUEXT) : $(UNIXINC)/dl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT)
  221. $(COMPILER) $<
  222. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  223. $(COMPILER) $<
  224. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  225. $(COMPILER) $<
  226. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
  227. $(COMPILER) $<
  228. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp unix$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  229. $(COMPILER) $<
  230. initc$(PPUEXT) : $(UNIXINC)/initc.pp $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT)
  231. $(COMPILER) $<
  232. # console$(PPUEXT) : baseunix$(PPUEXT) termio$(PPUEXT)
  233. cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT) dynlibs$(PPUEXT) unixcp$(PPUEXT)
  234. $(COMPILER) $<
  235. bsd$(PPUEXT) : $(BSDINC)/bsd.pas initc$(PPUEXT) unix$(PPUEXT)
  236. $(COMPILER) $<