Makefile.fpc 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. #
  2. # Makefile.fpc for Free Pascal Darwin RTL
  3. #
  4. [package]
  5. main=rtl
  6. # disabled units: serial ipc
  7. [target]
  8. loaders=
  9. units=$(SYSTEMUNIT) unixtype ctypes objpas macpas strings sysctl baseunix unixutil \
  10. unix initc cmem matrix dynlibs $(CPU_UNITS) \
  11. dos dl objects printer sockets \
  12. sysutils typinfo fgl classes math varutils types \
  13. charset ucomplex getopts heaptrc lineinfo lnfodwrf \
  14. errors terminfo termio video crt mouse keyboard console \
  15. variants types sysctl dateutils convutils stdconvs \
  16. sysconst cthreads strutils rtlconsts cwstring bsd fmtbcd
  17. rsts=math varutils typinfo classes variants dateutils sysconst rtlconsts
  18. [require]
  19. nortl=y
  20. [install]
  21. fpcpackage=y
  22. [default]
  23. fpcdir=../..
  24. target=darwin
  25. [compiler]
  26. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(OSPROCINC)
  27. sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(COMMON)
  28. [lib]
  29. libname=libfprtl.so
  30. libversion=2.0.0
  31. libunits=$(SYSTEMUNIT) objpas strings \
  32. unix \
  33. dos crt objects printer \
  34. sysutils typinfo math \
  35. cpu mmx getopts heaptrc \
  36. errors sockets ipc
  37. [prerules]
  38. ifeq ($(CPU_TARGET),i386)
  39. CPU_UNITS=mmx cpu
  40. else
  41. CPU_UNITS=
  42. endif
  43. RTL=..
  44. INC=$(RTL)/inc
  45. COMMON=$(RTL)/common
  46. PROCINC=$(RTL)/$(CPU_TARGET)
  47. BSDINC=$(RTL)/bsd
  48. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  49. OSPROCINC=$(RTL)/darwin/$(CPU_TARGET)
  50. UNIXINC=$(RTL)/unix
  51. UNITPREFIX=rtl
  52. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  53. SYSTEMUNIT=system
  54. override FPCOPT+=-dNOMOUSE
  55. else
  56. SYSTEMUNIT="Error: Darwin is not supported for 1.0"
  57. endif
  58. # Use new feature from 1.0.5 version
  59. # that generates release PPU files
  60. # which will not be recompiled
  61. ifdef RELEASE
  62. override FPCOPT+=-Ur
  63. endif
  64. # Darwin requires libc, no syscalls
  65. override FPCOPT+=-dFPC_USE_LIBC
  66. # Paths
  67. OBJPASDIR=$(RTL)/objpas
  68. GRAPHDIR=$(INC)/graph
  69. # Use new graph unit ?
  70. # NEWGRAPH=YES
  71. # Use LibGGI ?
  72. # Use
  73. #
  74. ifndef USELIBGGI
  75. USELIBGGI=NO
  76. endif
  77. [rules]
  78. # Get the system independent include file names.
  79. # This will set the following variables :
  80. # SYSINCNAMES
  81. include $(INC)/makefile.inc
  82. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  83. # Get the processor dependent include file names.
  84. # This will set the following variables :
  85. # CPUINCNAMES
  86. include $(PROCINC)/makefile.cpu
  87. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  88. # Put system unit dependencies together.
  89. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  90. #
  91. # System Units (System, Objpas, Strings)
  92. #
  93. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp $(SYSDEPS)
  94. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  95. objpas$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  96. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  97. dateutils$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) sysutils$(PPUEXT) math$(PPUEXT) types$(PPUEXT) sysconst$(PPUEXT) $(OBJPASDIR)/dateutils.pp baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  98. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  99. strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
  100. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  101. $(SYSTEMUNIT)$(PPUEXT)
  102. #
  103. # System Dependent Units
  104. #
  105. baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
  106. signal.inc $(UNIXINC)/bunxh.inc \
  107. $(BSDINC)/bunxsysc.inc \
  108. $(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
  109. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  110. unixtype$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(UNIXINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
  111. unix$(PPUEXT) : unixtype$(PPUEXT) baseunix$(PPUEXT) unixutil$(PPUEXT) strings$(PPUEXT) $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  112. unxconst.inc $(UNIXINC)/timezone.inc \
  113. unxfunc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. unixutil$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  115. dynlibs$(PPUEXT) : dl$(PPUEXT) objpas$(PPUEXT)
  116. ctypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
  117. #
  118. # TP7 Compatible RTL Units
  119. #
  120. dos$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  121. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  122. crt$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unix$(PPUEXT) termio$(PPUEXT) $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  123. objects$(PPUEXT) : dos$(PPUEXT) $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  124. printer$(PPUEXT) : unix$(PPUEXT) strings$(PPUEXT) baseunix$(PPUEXT) $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. #
  126. # Graph
  127. #
  128. #
  129. # Delphi Compatible Units
  130. #
  131. sysutils$(PPUEXT) : objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT) $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  132. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
  133. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  134. classes$(PPUEXT) : sysutils$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) typinfo$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  135. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
  136. $(COMPILER) -Fi$(OBJPASDIR)/classes $(UNIXINC)/classes.pp
  137. typinfo$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconsts$(PPUEXT)
  138. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  139. math$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  140. $(COMPILER) $(OBJPASDIR)/math.pp
  141. gettext$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  142. $(COMPILER) $(OBJPASDIR)/gettext.pp
  143. varutils$(PPUEXT) : sysutils$(PPUEXT) $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  144. $(OBJPASDIR)/varutilh.inc varutils.pp
  145. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  146. fmtbcd$(PPUEXT) : $(OBJPASDIR)/fmtbcd.pp objpas$(PPUEXT) sysutils$(PPUEXT) variants$(PPUEXT) classes$(PPUEXT) system$(PPUEXT)
  147. $(COMPILER) $(OBJPASDIR)/fmtbcd.pp
  148. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  149. $(COMPILER) $(OBJPASDIR)/types.pp
  150. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  151. $(COMPILER) $(OBJPASDIR)/fgl.pp
  152. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  153. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  154. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  155. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  156. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  157. sysutils$(PPUEXT)
  158. $(COMPILER) $(OBJPASDIR)/strutils.pp
  159. variants$(PPUEXT) : $(INC)/variants.pp sysutils$(PPUEXT) sysconst$(PPUEXT) varutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT)
  160. $(COMPILER) -Fi$(INC) $(INC)/variants.pp
  161. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  162. sysutils$(PPUEXT)
  163. $(COMPILER) $(OBJPASDIR)/convutils.pp
  164. stdconvs$(PPUEXT) : $(OBJPASDIR)/stdconvs.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  165. sysutils$(PPUEXT)
  166. $(COMPILER) $(OBJPASDIR)/stdconvs.pp
  167. #
  168. # Mac Pascal Model
  169. #
  170. macpas$(PPUEXT) : $(INC)/macpas.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  171. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  172. #
  173. # Other system-independent RTL Units
  174. #
  175. video$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/video.inc $(INC)/videoh.inc $(UNIXINC)/video.pp baseunix$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT)
  176. keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp mouse$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
  177. matrix$(PPUEXT) : $(INC)/matrix.pp $(SYSTEMUNIT)$(PPUEXT)
  178. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  179. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  180. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  181. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  182. $(COMPILER) -Sg $(INC)/heaptrc.pp
  183. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  184. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  185. charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
  186. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) math$(PPUEXT)
  187. #
  188. # Other system-dependent RTL Units
  189. #
  190. termio$(PPUEXT) : baseunix$(PPUEXT)
  191. mouse$(PPUEXT) : baseunix$(PPUEXT) video$(PPUEXT)
  192. dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
  193. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  194. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) baseunix$(PPUEXT) initc$(PPUEXT)
  195. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  196. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT) syscall$(PPUEXT)
  197. terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)
  198. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  199. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT)
  200. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp unix$(PPUEXT) sysutils$(PPUEXT)
  201. initc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) ctypes$(PPUEXT)
  202. console$(PPUEXT) : baseunix$(PPUEXT) termio$(PPUEXT)
  203. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  204. cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT)
  205. bsd$(PPUEXT) : initc$(PPUEXT) unix$(PPUEXT)