Makefile.fpc 4.6 KB

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