Makefile.fpc 6.7 KB

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