Makefile.fpc 4.5 KB

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