Makefile.fpc 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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
  17. units_netbsd_i386=mmx cpu
  18. rsts=math varutils typinfo variants classes sysconst
  19. [require]
  20. nortl=y
  21. [install]
  22. fpcpackage=y
  23. [default]
  24. fpcdir=../..
  25. target=netbsd
  26. [compiler]
  27. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(TARGETPROCINC)
  28. sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC)
  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. TARGETPROCINC=$(RTL)/netbsd/$(CPU_TARGET)
  47. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  48. SYSTEMUNIT=system
  49. LINUXUNIT=
  50. PRT0=prt0
  51. else
  52. SYSTEMUNIT=sysbsd
  53. LINUXUNIT=
  54. override FPCOPT+=-dUNIX
  55. PRT0=prt0_10
  56. endif
  57. # Use new feature from 1.0.5 version
  58. # that generates release PPU files
  59. # which will not be recompiled
  60. ifdef RELEASE
  61. override FPCOPT+=-Ur
  62. endif
  63. # Paths
  64. OBJPASDIR=$(RTL)/objpas
  65. GRAPHDIR=$(INC)/graph
  66. # Use new graph unit ?
  67. # NEWGRAPH=YES
  68. # Use LibGGI ?
  69. # Use
  70. #
  71. ifndef USELIBGGI
  72. USELIBGGI=NO
  73. endif
  74. [rules]
  75. # Get the system independent include file names.
  76. # This will set the following variables :
  77. # SYSINCNAMES
  78. include $(INC)/makefile.inc
  79. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  80. # Get the processor dependent include file names.
  81. # This will set the following variables :
  82. # CPUINCNAMES
  83. include $(PROCINC)/makefile.cpu
  84. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  85. # Put system unit dependencies together.
  86. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  87. #
  88. # Loaders
  89. #
  90. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  91. $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  92. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  93. $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  94. #
  95. # System Units (System, Objpas, Strings)
  96. #
  97. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  98. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  99. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  100. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  101. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  102. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  103. $(SYSTEMUNIT)$(PPUEXT)
  104. #
  105. # System Dependent Units
  106. #
  107. baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  108. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  109. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  110. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  111. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  112. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  113. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  114. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  115. #
  116. # TP7 Compatible RTL Units
  117. #
  118. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  119. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  121. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  122. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  123. #
  124. # Graph
  125. #
  126. #
  127. # Delphi Compatible Units
  128. #
  129. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  130. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
  131. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  132. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  133. sysutils$(PPUEXT) typinfo$(PPUEXT)
  134. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  135. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  136. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  137. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  138. $(COMPILER) $(OBJPASDIR)/math.pp
  139. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  140. $(COMPILER) $(OBJPASDIR)/gettext.pp
  141. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  142. $(OBJPASDIR)/varutilh.inc varutils.pp
  143. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  144. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  145. $(COMPILER) $(OBJPASDIR)/types.pp
  146. #
  147. # Mac Pascal Model
  148. #
  149. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  150. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  151. #
  152. # Other system-independent RTL Units
  153. #
  154. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  155. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  156. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  157. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  158. $(COMPILER) -Sg $(INC)/heaptrc.pp
  159. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  160. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  161. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  162. #
  163. # Other system-dependent RTL Units
  164. #
  165. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  166. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  167. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  168. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  169. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  170. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  171. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
  172. syscall$(PPUEXT) : $(UNIXINC)/syscall.pp
  173. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  174. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  175. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)