Makefile.fpc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. #
  2. # Makefile.fpc for Free Pascal NetBSD RTL
  3. #
  4. [package]
  5. main=rtl
  6. [install]
  7. fpcpackage=y
  8. [target]
  9. loaders=prt0 cprt0
  10. units=$(SYSTEMUNIT) objpas macpas strings syscall baseunix \
  11. $(LINUXUNIT) unix initc systhrds \
  12. dos crt objects printer matrix \
  13. sysutils classes typinfo math varutils \
  14. charset ucomplex getopts heaptrc lineinfo \
  15. errors sockets gpm ipc terminfo \
  16. video mouse keyboard serial variants types systhrds sysctl sysconst $(CPU_UNITS)
  17. rsts=math varutils typinfo variants classes sysconst
  18. [require]
  19. nortl=y
  20. [install]
  21. fpcpackage=y
  22. [default]
  23. fpcdir=../..
  24. target=netbsd
  25. [compiler]
  26. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
  27. sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
  28. [lib]
  29. libname=libfprtl.so
  30. libversion=2.0.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. UNIXINC=$(RTL)/unix
  44. UNITPREFIX=rtl
  45. TARGETPROCINC=$(RTL)/netbsd/$(CPU_TARGET)
  46. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  47. SYSTEMUNIT=system
  48. LINUXUNIT=
  49. PRT0=prt0
  50. else
  51. SYSTEMUNIT=sysbsd
  52. LINUXUNIT=
  53. override FPCOPT+=-dUNIX
  54. PRT0=prt0_10
  55. endif
  56. # Use new feature from 1.0.5 version
  57. # that generates release PPU files
  58. # which will not be recompiled
  59. ifdef RELEASE
  60. override FPCOPT+=-Ur
  61. endif
  62. # Paths
  63. OBJPASDIR=$(RTL)/objpas
  64. GRAPHDIR=$(INC)/graph
  65. # Use new graph unit ?
  66. # NEWGRAPH=YES
  67. # Use LibGGI ?
  68. # Use
  69. #
  70. ifndef USELIBGGI
  71. USELIBGGI=NO
  72. endif
  73. ifeq ($(CPU_TARGET),i386)
  74. CPU_UNITS=x86 ports cpu mmx
  75. else
  76. CPU_UNITS=
  77. endif
  78. [rules]
  79. # Get the system independent include file names.
  80. # This will set the following variables :
  81. # SYSINCNAMES
  82. include $(INC)/makefile.inc
  83. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  84. # Get the processor dependent include file names.
  85. # This will set the following variables :
  86. # CPUINCNAMES
  87. include $(PROCINC)/makefile.cpu
  88. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  89. # Put system unit dependencies together.
  90. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  91. #
  92. # Loaders
  93. #
  94. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  95. $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  96. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  97. $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  98. #
  99. # System Units (System, Objpas, Strings)
  100. #
  101. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  102. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  103. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  104. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  105. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  106. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  107. $(SYSTEMUNIT)$(PPUEXT)
  108. #
  109. # System Dependent Units
  110. #
  111. baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  112. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  113. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  114. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  115. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  116. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  117. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  118. unixsysc.inc 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) sysconst$(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. # Mac Pascal Model
  152. #
  153. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  154. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  155. #
  156. # Other system-independent RTL Units
  157. #
  158. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  159. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  160. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  161. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  162. $(COMPILER) -Sg $(INC)/heaptrc.pp
  163. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  164. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  165. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  166. #
  167. # Other system-dependent RTL Units
  168. #
  169. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  170. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  171. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  172. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  173. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  174. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  175. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
  176. syscall$(PPUEXT) : $(UNIXINC)/syscall.pp
  177. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  178. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  179. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)