Makefile.fpc 12 KB

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