2
0

Makefile.fpc 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. #
  2. # Makefile.fpc for Free Pascal FreeBSD RTL
  3. #
  4. [package]
  5. main=rtl
  6. [install]
  7. fpcpackage=y
  8. [target]
  9. loaders=prt0 cprt0 gprt0
  10. units=$(SYSTEMUNIT) objpas strings baseunix syscall unixutil \
  11. $(LINUXUNIT) unix initc \
  12. dos dl crt objects printer \
  13. sysutils typinfo systhrds classes math varutils \
  14. cpu mmx charset ucomplex getopts heaptrc lineinfo \
  15. errors sockets gpm ipc terminfo \
  16. video mouse keyboard console serial variants types sysctl
  17. rsts=math varutils typinfo classes variants
  18. [require]
  19. nortl=y
  20. [install]
  21. fpcpackage=y
  22. [default]
  23. fpcdir=../..
  24. target=freebsd
  25. [compiler]
  26. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC)
  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. UNIXINC=$(RTL)/unix
  45. UNITPREFIX=rtl
  46. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  47. SYSTEMUNIT=system
  48. LINUXUNIT=
  49. PRT0=prt0
  50. override FPCOPT+=-dNOMOUSE
  51. loaders+=gprt0
  52. else
  53. SYSTEMUNIT=sysbsd
  54. LINUXUNIT=linux
  55. override FPCOPT+=-dUNIX -dNOMOUSE
  56. PRT0=prt0_10
  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. # Paths
  65. OBJPASDIR=$(RTL)/objpas
  66. GRAPHDIR=$(INC)/graph
  67. # Use new graph unit ?
  68. # NEWGRAPH=YES
  69. # Use LibGGI ?
  70. # Use
  71. #
  72. ifndef USELIBGGI
  73. USELIBGGI=NO
  74. endif
  75. [rules]
  76. # Get the system independent include file names.
  77. # This will set the following variables :
  78. # SYSINCNAMES
  79. include $(INC)/makefile.inc
  80. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  81. # Get the processor dependent include file names.
  82. # This will set the following variables :
  83. # CPUINCNAMES
  84. include $(PROCINC)/makefile.cpu
  85. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  86. # Put system unit dependencies together.
  87. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  88. #
  89. # Loaders
  90. #
  91. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  92. $(AS) -o prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  93. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  94. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  95. gprt0$(OEXT) : $(CPU_TARGET)/gprt0.as
  96. $(AS) -o gprt0$(OEXT) $(CPU_TARGET)/gprt0.as
  97. #
  98. # System Units (System, Objpas, Strings)
  99. #
  100. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  101. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  102. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  103. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  104. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  105. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  106. $(SYSTEMUNIT)$(PPUEXT)
  107. #
  108. # System Dependent Units
  109. #
  110. baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  111. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  112. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  113. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  114. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  115. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  116. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  117. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  118. linux$(PPUEXT) : baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  119. #
  120. # TP7 Compatible RTL Units
  121. #
  122. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  123. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  124. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  126. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  127. #
  128. # Graph
  129. #
  130. #
  131. # Delphi Compatible Units
  132. #
  133. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  134. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT)
  135. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  136. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  137. sysutils$(PPUEXT) typinfo$(PPUEXT)
  138. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  139. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  140. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  141. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  142. $(COMPILER) $(OBJPASDIR)/math.pp
  143. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  144. $(COMPILER) $(OBJPASDIR)/gettext.pp
  145. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  146. $(OBJPASDIR)/varutilh.inc varutils.pp
  147. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  148. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  149. $(COMPILER) $(OBJPASDIR)/types.pp
  150. #
  151. # Other system-independent RTL Units
  152. #
  153. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  154. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  155. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  156. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  157. $(COMPILER) -Sg $(INC)/heaptrc.pp
  158. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  159. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  160. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  161. #
  162. # Other system-dependent RTL Units
  163. #
  164. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  165. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  166. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  167. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  168. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  169. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  170. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)