Makefile.fpc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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 strings syscall baseunix \
  11. $(LINUXUNIT) unix initc systhrds \
  12. dos crt objects printer \
  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. targetdir=.
  30. [lib]
  31. libname=libfprtl.so
  32. libversion=1.0
  33. libunits=$(SYSTEMUNIT) objpas strings \
  34. unix \
  35. dos crt objects printer \
  36. sysutils typinfo math \
  37. cpu mmx getopts heaptrc \
  38. errors sockets ipc
  39. [prerules]
  40. RTL=..
  41. INC=$(RTL)/inc
  42. PROCINC=$(RTL)/$(CPU_TARGET)
  43. BSDINC=$(RTL)/bsd
  44. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  45. UNIXINC=$(RTL)/unix
  46. UNITPREFIX=rtl
  47. TARGETPROCINC=$(RTL)/netbsd/$(CPU_TARGET)
  48. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  49. SYSTEMUNIT=system
  50. LINUXUNIT=
  51. PRT0=prt0
  52. else
  53. SYSTEMUNIT=sysbsd
  54. LINUXUNIT=
  55. override FPCOPT+=-dUNIX
  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. #
  96. # System Units (System, Objpas, Strings)
  97. #
  98. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  99. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  100. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  101. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  102. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  103. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  104. $(SYSTEMUNIT)$(PPUEXT)
  105. #
  106. # System Dependent Units
  107. #
  108. baseunix$(PPUEXT) : errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  109. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  110. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  111. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  112. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  113. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  114. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  115. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  116. #
  117. # TP7 Compatible RTL Units
  118. #
  119. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  120. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  121. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  122. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  123. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  124. #
  125. # Graph
  126. #
  127. #
  128. # Delphi Compatible Units
  129. #
  130. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  131. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT) sysconst$(PPUEXT)
  132. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  133. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  134. sysutils$(PPUEXT) typinfo$(PPUEXT)
  135. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  136. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  137. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  138. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  139. $(COMPILER) $(OBJPASDIR)/math.pp
  140. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  141. $(COMPILER) $(OBJPASDIR)/gettext.pp
  142. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  143. $(OBJPASDIR)/varutilh.inc varutils.pp
  144. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  145. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  146. $(COMPILER) $(OBJPASDIR)/types.pp
  147. #
  148. # Other system-independent RTL Units
  149. #
  150. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  151. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  152. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  153. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  154. $(COMPILER) -Sg $(INC)/heaptrc.pp
  155. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  156. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  157. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  158. #
  159. # Other system-dependent RTL Units
  160. #
  161. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  162. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  163. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  164. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  165. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  166. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  167. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)
  168. syscall$(PPUEXT) : $(UNIXINC)/syscall.pp
  169. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  170. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  171. cthreads$(PPUEXT) : $(UNIXINC)/cthreads.pp systhrds$(PPUEXT)