Makefile.fpc 4.6 KB

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