Makefile.fpc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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 baseunix \
  11. $(LINUXUNIT) unix initc \
  12. dos crt objects printer \
  13. sysutils typinfo math varutils \
  14. cpu mmx charset ucomplex getopts heaptrc lineinfo \
  15. errors sockets gpm ipc terminfo \
  16. video mouse keyboard console serial variants types systhrds sysctl
  17. rsts=math varutils typinfo
  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)
  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. else
  51. SYSTEMUNIT=sysbsd
  52. LINUXUNIT=linux
  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. [rules]
  74. # Get the system independent include file names.
  75. # This will set the following variables :
  76. # SYSINCNAMES
  77. include $(INC)/makefile.inc
  78. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  79. # Get the processor dependent include file names.
  80. # This will set the following variables :
  81. # CPUINCNAMES
  82. include $(PROCINC)/makefile.cpu
  83. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  84. # Put system unit dependencies together.
  85. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  86. #
  87. # Loaders
  88. #
  89. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  90. $(AS) -o prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  91. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  92. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  93. #
  94. # System Units (System, Objpas, Strings)
  95. #
  96. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  97. $(COMPILER) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  98. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  99. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  100. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  101. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  102. $(SYSTEMUNIT)$(PPUEXT)
  103. #
  104. # System Dependent Units
  105. #
  106. baseunix$(PPUEXT) : $(UNIXINC)/errno.inc $(BSDINC)/bunxtype.inc ptypes.inc $(BSDINC)/ctypes.inc \
  107. signal.inc $(UNIXINC)/bunxh.inc $(BSDINC)/bunxmain.inc $(BSDINC)/ostypes.inc \
  108. $(BSDINC)/bunxfunc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  109. $(BSDINC)/ostypes.inc $(BSDINC)/ossysch.inc $(BSDINC)/bunxmacr.inc $(UNIXINC)/gensigset.inc \
  110. $(UNIXINC)/genfuncs.inc $(SYSTEMUNIT)$(PPUEXT)
  111. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  112. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc \
  113. unixsysc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. linux$(PPUEXT) : 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)/*.inc) \
  130. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT)
  131. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/sysutils.pp
  132. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  133. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  134. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  135. $(COMPILER) $(OBJPASDIR)/math.pp
  136. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  137. $(COMPILER) $(OBJPASDIR)/gettext.pp
  138. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  139. $(OBJPASDIR)/varutilh.inc varutils.pp
  140. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  141. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  142. $(COMPILER) $(OBJPASDIR)/types.pp
  143. #
  144. # Other system-independent RTL Units
  145. #
  146. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  147. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  148. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  149. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  150. $(COMPILER) -Sg $(INC)/heaptrc.pp
  151. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  152. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  153. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  154. #
  155. # Other system-dependent RTL Units
  156. #
  157. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  158. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  159. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  160. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  161. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
  162. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  163. sysctl$(PPUEXT) : $(BSDINC)/sysctl.pp $(SYSTEMUNIT)$(PPUEXT)