Makefile.fpc 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. #
  2. # Makefile.fpc for Free Pascal Darwin RTL
  3. #
  4. [package]
  5. main=rtl
  6. # disabled units: termio crt video keyboard serial sockets ipc mouse console
  7. [target]
  8. loaders=
  9. units=$(SYSTEMUNIT) objpas strings sysctl baseunix unixutil \
  10. unix initc \
  11. dos dl objects printer \
  12. sysutils typinfo systhrds classes math varutils \
  13. charset ucomplex getopts heaptrc lineinfo \
  14. errors terminfo \
  15. variants types sysctl dateutils \
  16. sysconst cthreads
  17. rsts=math varutils typinfo classes variants dateutils sysconst
  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. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  91. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  92. dateutils$(PPUEXT): $(OBJPASDIR)/dateutils.pp baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  93. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  94. strings$(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) : 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. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  106. sysconst.inc $(UNIXINC)/timezone.inc \
  107. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  108. #
  109. # TP7 Compatible RTL Units
  110. #
  111. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  112. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  113. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  115. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  116. #
  117. # Graph
  118. #
  119. #
  120. # Delphi Compatible Units
  121. #
  122. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  123. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) $(OBJPASDIR)/sysconst$(PPUEXT)
  124. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  125. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  126. sysutils$(PPUEXT) typinfo$(PPUEXT)
  127. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  128. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  129. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  130. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  131. $(COMPILER) $(OBJPASDIR)/math.pp
  132. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  133. $(COMPILER) $(OBJPASDIR)/gettext.pp
  134. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  135. $(OBJPASDIR)/varutilh.inc varutils.pp
  136. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  137. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  138. $(COMPILER) $(OBJPASDIR)/types.pp
  139. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  140. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  141. #
  142. # Other system-independent RTL Units
  143. #
  144. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  145. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  146. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  147. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  148. $(COMPILER) -Sg $(INC)/heaptrc.pp
  149. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  150. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  151. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  152. #
  153. # Other system-dependent RTL Units
  154. #
  155. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  156. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  157. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  158. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  159. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  160. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  161. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
  162. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)