Makefile.fpc 4.7 KB

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