Makefile.fpc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. #
  2. # Makefile.fpc for Free Pascal FreeBSD RTL
  3. #
  4. [targets]
  5. loaders=prt0 cprt0
  6. units=$(SYSTEMUNIT) objpas strings \
  7. unix initc \
  8. dos crt objects printer \
  9. sysutils typinfo math \
  10. cpu mmx getopts heaptrc lineinfo \
  11. errors sockets gpm ipc terminfo \
  12. video mouse keyboard console
  13. rst=math
  14. [require]
  15. rtl=0
  16. [defaults]
  17. defaulttarget=freebsd
  18. defaultcpu=i386
  19. [install]
  20. unitsubdir=rtl
  21. [dirs]
  22. fpcdir=.
  23. incdir=$(INC) $(PROCINC) $(UNIXINC)
  24. targetdir=.
  25. [libs]
  26. libname=libfprtl.so
  27. libversion=1.0
  28. libunits=$(SYSTEMUNIT) objpas strings \
  29. unix \
  30. dos crt objects printer \
  31. sysutils typinfo math \
  32. cpu mmx getopts heaptrc \
  33. errors sockets ipc
  34. [presettings]
  35. RTL=..
  36. INC=$(RTL)/inc
  37. PROCINC=$(RTL)/$(CPU_TARGET)
  38. UNIXINC=$(RTL)/unix
  39. UNITPREFIX=rtl
  40. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  41. SYSTEMUNIT=system
  42. PRT0=prt0
  43. else
  44. SYSTEMUNIT=sysbsd
  45. override FPCOPT+=-dUNIX
  46. PRT0=prt0_10
  47. endif
  48. # Paths
  49. OBJPASDIR=$(RTL)/objpas
  50. GRAPHDIR=$(INC)/graph
  51. # Use new graph unit ?
  52. # NEWGRAPH=YES
  53. # Use LibGGI ?
  54. # Use
  55. #
  56. ifndef USELIBGGI
  57. USELIBGGI=NO
  58. endif
  59. [postsettings]
  60. # Get the system independent include file names.
  61. # This will set the following variables :
  62. # SYSINCNAMES
  63. include $(INC)/makefile.inc
  64. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  65. # Get the processor dependent include file names.
  66. # This will set the following variables :
  67. # CPUINCNAMES
  68. include $(PROCINC)/makefile.cpu
  69. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  70. # Put system unit dependencies together.
  71. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  72. [rules]
  73. vpath %$(PASEXT) $(INC) $(PROCINC) $(UNIXINC)
  74. #
  75. # Loaders
  76. #
  77. prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as
  78. $(AS) -o prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as
  79. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  80. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  81. #
  82. # System Units (System, Objpas, Strings)
  83. #
  84. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp sysconst.inc systypes.inc syscalls.inc $(SYSDEPS)
  85. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
  86. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  87. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  88. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  89. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  90. $(SYSTEMUNIT)$(PPUEXT)
  91. #
  92. # System Dependent Units
  93. #
  94. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  95. syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
  96. $(UNIXINC)/linsysca.inc
  97. #
  98. # TP7 Compatible RTL Units
  99. #
  100. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  101. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  102. crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  103. objects$(PPUEXT) : $(INC)/objects.pp $(UNIXINC)/objinc.inc $(SYSTEMUNIT)$(PPUEXT)
  104. printer$(PPUEXT) : $(UNIXINC)/printer.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  105. #
  106. # Graph
  107. #
  108. #
  109. # Delphi Compatible Units
  110. #
  111. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  112. objpas$(PPUEXT) unix$(PPUEXT) errors$(PPUEXT)
  113. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/sysutils.pp $(REDIR)
  114. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  115. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  116. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  117. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  118. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  119. $(COMPILER) $(OBJPASDIR)/gettext.pp $(REDIR)
  120. #
  121. # Other system-independent RTL Units
  122. #
  123. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  124. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  126. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  127. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  128. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  129. #
  130. # Other system-dependent RTL Units
  131. #
  132. sockets$(PPUEXT) : $(UNIXINC)/sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  133. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  134. errors$(PPUEXT) : $(UNIXINC)/errors.pp strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  135. ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  136. terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)