Makefile.fpc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. [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=libfprtl.so
  25. libversion=1.0
  26. libunits=$(SYSTEMUNIT) objpas strings \
  27. linux ports \
  28. dos crt objects printer \
  29. sysutils typinfo math \
  30. cpu mmx getopts heaptrc \
  31. errors sockets ipc
  32. [presettings]
  33. RTL=..
  34. INC=$(RTL)/inc
  35. PROCINC=$(RTL)/$(CPU_TARGET)
  36. UNITPREFIX=rtl
  37. # Paths
  38. OBJPASDIR=$(RTL)/objpas
  39. GRAPHDIR=$(INC)/graph
  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) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  94. syscalls.inc systypes.inc sysconst.inc timezone.inc $(SYSTEMPPU) \
  95. linsysca.inc
  96. ports$(PPUEXT) : ports.pp linux$(PPUEXT) objpas$(PPUEXT)
  97. #
  98. # TP7 Compatible RTL Units
  99. #
  100. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  101. linux$(PPUEXT) $(SYSTEMPPU)
  102. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
  103. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  104. printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
  105. #
  106. # Graph
  107. #
  108. include $(GRAPHDIR)/makefile.inc
  109. GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
  110. graph$(PPUEXT) : graph.pp linux$(PPUEXT) $(SYSTEMPPU) \
  111. $(GRAPHINCDEPS) vgagraph16.inc
  112. $(COMPILER) -I$(GRAPHDIR) graph.pp $(REDIR)
  113. ggigraph$(PPUEXT) : ggigraph.pp linux$(PPUEXT) $(SYSTEMPPU) \
  114. $(GRAPHINCDEPS)
  115. $(COMPILER) -I$(GRAPHDIR) ggigraph.pp $(REDIR)
  116. #
  117. # Delphi Compatible Units
  118. #
  119. sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  120. filutil.inc disk.inc objpas$(PPUEXT) linux$(PPUEXT)
  121. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
  122. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  123. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  124. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  125. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  126. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  127. $(COMPILER) $(OBJPASDIR)/gettext.pp $(REDIR)
  128. #
  129. # Other system-independent RTL Units
  130. #
  131. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  132. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  133. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  134. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  135. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  136. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
  137. #
  138. # Other system-dependent RTL Units
  139. #
  140. sockets$(PPUEXT) : sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
  141. linux$(PPUEXT) $(SYSTEMPPU)
  142. errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
  143. ipc$(PPUEXT) : ipc.pp linux$(PPUEXT) $(SYSTEMPPU)