Makefile.fpc 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 \
  11. dos dl objects printer sockets \
  12. sysutils typinfo systhrds classes math varutils \
  13. charset ucomplex getopts heaptrc lineinfo \
  14. errors terminfo termio video crt mouse keyboard console \
  15. variants types sysctl dateutils \
  16. sysconst cthreads strutils rtlconst
  17. rsts=math varutils typinfo classes variants dateutils systhrds sysconst rtlconst
  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)
  28. [lib]
  29. libname=libfprtl.so
  30. libversion=1.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. RTL=..
  39. INC=$(RTL)/inc
  40. PROCINC=$(RTL)/$(CPU_TARGET)
  41. BSDINC=$(RTL)/bsd
  42. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  43. OSPROCINC=$(RTL)/darwin/$(CPU_TARGET)
  44. UNIXINC=$(RTL)/unix
  45. UNITPREFIX=rtl
  46. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  47. SYSTEMUNIT=system
  48. override FPCOPT+=-dNOMOUSE
  49. else
  50. SYSTEMUNIT="Error: Darwin is not supported for 1.0"
  51. endif
  52. # Use new feature from 1.0.5 version
  53. # that generates release PPU files
  54. # which will not be recompiled
  55. ifdef RELEASE
  56. override FPCOPT+=-Ur
  57. endif
  58. # Darwin requires libc, no syscalls
  59. override FPCOPT+=-dFPC_USE_LIBC
  60. # Paths
  61. OBJPASDIR=$(RTL)/objpas
  62. GRAPHDIR=$(INC)/graph
  63. # Use new graph unit ?
  64. # NEWGRAPH=YES
  65. # Use LibGGI ?
  66. # Use
  67. #
  68. ifndef USELIBGGI
  69. USELIBGGI=NO
  70. endif
  71. [rules]
  72. # Get the system independent include file names.
  73. # This will set the following variables :
  74. # SYSINCNAMES
  75. include $(INC)/makefile.inc
  76. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  77. # Get the processor dependent include file names.
  78. # This will set the following variables :
  79. # CPUINCNAMES
  80. include $(PROCINC)/makefile.cpu
  81. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  82. # Put system unit dependencies together.
  83. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  84. #
  85. # System Units (System, Objpas, Strings)
  86. #
  87. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc $(SYSDEPS)
  88. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  89. systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  90. objpas$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  91. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  92. dateutils$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) sysutils$(PPUEXT) math$(PPUEXT) types$(PPUEXT) sysconst$(PPUEXT) $(OBJPASDIR)/dateutils.pp baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  93. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  94. strings$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/strings.pp $(INC)/stringsi.inc\
  95. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  96. $(SYSTEMUNIT)$(PPUEXT)
  97. #
  98. # System Dependent Units
  99. #
  100. baseunix$(PPUEXT) : unixtype$(PPUEXT) sysctl$(PPUEXT) errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  101. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  102. $(BSDINC)/bunxfunc.inc \
  103. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  104. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  105. unixtype$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(UNIXINC)/unixtype.pp ptypes.inc $(BSDINC)/ctypes.inc $(SYSTEMUNIT)$(PPUEXT)
  106. unix$(PPUEXT) : unixtype$(PPUEXT) baseunix$(PPUEXT) unixutil$(PPUEXT) strings$(PPUEXT) $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  107. sysconst.inc $(UNIXINC)/timezone.inc \
  108. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  109. unixutil$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  110. dynlibs$(PPUEXT) : dl$(PPUEXT)
  111. ctypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  112. #
  113. # TP7 Compatible RTL Units
  114. #
  115. dos$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT) unix$(PPUEXT) $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  116. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  117. crt$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) unix$(PPUEXT) termio$(PPUEXT) $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  118. objects$(PPUEXT) : dos$(PPUEXT) $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  119. printer$(PPUEXT) : unix$(PPUEXT) strings$(PPUEXT) baseunix$(PPUEXT) $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. #
  121. # Graph
  122. #
  123. #
  124. # Delphi Compatible Units
  125. #
  126. sysutils$(PPUEXT) : objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT) $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  127. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
  128. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  129. classes$(PPUEXT) : sysutils$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) typinfo$(PPUEXT) unix$(PPUEXT) systhrds$(PPUEXT) classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  130. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT)
  131. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  132. typinfo$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  133. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  134. math$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  135. $(COMPILER) $(OBJPASDIR)/math.pp
  136. gettext$(PPUEXT): sysutils$(PPUEXT) $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  137. $(COMPILER) $(OBJPASDIR)/gettext.pp
  138. varutils$(PPUEXT) : sysutils$(PPUEXT) $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  139. $(OBJPASDIR)/varutilh.inc varutils.pp
  140. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  141. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  142. $(COMPILER) $(OBJPASDIR)/types.pp
  143. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  144. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  145. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  146. $(COMPILER) $(OBJPASDIR)/rtlconst.pp
  147. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  148. sysutils$(PPUEXT)
  149. $(COMPILER) $(OBJPASDIR)/strutils.pp
  150. variants$(PPUEXT) : sysutils$(PPUEXT) sysconst$(PPUEXT) varutils$(PPUEXT)
  151. #
  152. # Mac Pascal Model
  153. #
  154. macpas$(PPUEXT) : $(INC)/macpas.pp $(SYSTEMUNIT)$(PPUEXT)
  155. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  156. #
  157. # Other system-independent RTL Units
  158. #
  159. video$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/video.inc $(INC)/videoh.inc $(UNIXINC)/video.pp baseunix$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT)
  160. keyboard$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) $(INC)/keyboard.inc $(INC)/keybrdh.inc $(UNIXINC)/keyboard.pp mouse$(PPUEXT) strings$(PPUEXT) terminfo$(PPUEXT) termio$(PPUEXT) baseunix$(PPUEXT)
  161. matrix$(PPUEXT) : $(INC)/matrix.pp $(SYSTEMUNIT)$(PPUEXT)
  162. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  163. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  164. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  165. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  166. $(COMPILER) -Sg $(INC)/heaptrc.pp
  167. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  168. charset$(PPUEXT) : $(INC)/charset.pp objpas$(PPUEXT)
  169. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) math$(PPUEXT)
  170. #
  171. # Other system-dependent RTL Units
  172. #
  173. termio$(PPUEXT) : baseunix$(PPUEXT)
  174. mouse$(PPUEXT) : baseunix$(PPUEXT) video$(PPUEXT)
  175. dl$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  176. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  177. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) unixtype$(PPUEXT) baseunix$(PPUEXT) initc$(PPUEXT)
  178. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) strings$(PPUEXT)
  179. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) baseunix$(PPUEXT) syscall$(PPUEXT)
  180. terminfo$(PPUEXT) : terminfo.pp baseunix$(PPUEXT)
  181. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  182. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
  183. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT) unix$(PPUEXT) sysutils$(PPUEXT)
  184. initc$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  185. console$(PPUEXT) : baseunix$(PPUEXT) termio$(PPUEXT)
  186. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)