Makefile.fpc 8.0 KB

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