Makefile.fpc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. #
  2. # Makefile.fpc for Go32v2 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0 exceptn fpu
  8. units=system objpas strings \
  9. go32 dpmiexcp initc ports profile dxeload emu387 \
  10. dos crt objects printer graph \
  11. sysutils math typinfo \
  12. cpu mmx ucomplex getopts heaptrc lineinfo \
  13. msmouse charset varutils \
  14. video mouse keyboard variants vesamode types
  15. rsts=math varutils typinfo
  16. [require]
  17. nortl=y
  18. [install]
  19. fpcpackage=y
  20. [default]
  21. fpcdir=../..
  22. target=go32v2
  23. cpu=i386
  24. [compiler]
  25. includedir=$(INC) $(PROCINC)
  26. sourcedir=$(INC) $(PROCINC)
  27. targetdir=.
  28. [prerules]
  29. RTL=..
  30. INC=../inc
  31. PROCINC=../$(CPU_TARGET)
  32. UNITPREFIX=rtl
  33. # Use new feature from 1.0.5 version
  34. # that generates release PPU files
  35. # which will not be recompiled
  36. ifdef RELEASE
  37. override FPCOPT+=-Ur
  38. endif
  39. # Paths
  40. OBJPASDIR=$(RTL)/objpas
  41. GRAPHDIR=$(INC)/graph
  42. # Insert exception handler in system unit
  43. ifdef EXCEPTIONS_IN_SYSTEM
  44. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  45. endif
  46. # Insert exception handler in system unit
  47. ifdef NO_EXCEPTIONS_IN_SYSTEM
  48. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  49. endif
  50. [rules]
  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. #
  64. # Loaders
  65. #
  66. prt0$(OEXT) : v2prt0.as
  67. $(AS) -o prt0$(OEXT) v2prt0.as
  68. #
  69. # System Units (System, Objpas, Strings)
  70. #
  71. system$(PPUEXT) : system.pp $(SYSDEPS)
  72. $(COMPILER) -Us -Sg system.pp
  73. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  74. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  75. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  76. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  77. system$(PPUEXT)
  78. #
  79. # System Dependent Units
  80. #
  81. go32$(PPUEXT) : go32.pp system$(PPUEXT)
  82. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) system$(PPUEXT)
  83. $(COMPILER) -Sg dpmiexcp.pp
  84. initc$(PPUEXT) : initc.pp system$(PPUEXT)
  85. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) go32$(PPUEXT)
  86. dxeload$(PPUEXT) : dxeload.pp system$(PPUEXT)
  87. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  88. dpmiexcp$(PPUEXT)
  89. ports$(PPUEXT) : ports.pp objpas$(PPUEXT) system$(PPUEXT)
  90. #
  91. # TP7 Compatible RTL Units
  92. #
  93. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  94. go32$(PPUEXT) strings$(PPUEXT) system$(PPUEXT)
  95. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) system$(PPUEXT)
  96. objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT)
  97. printer$(PPUEXT) : printer.pp system$(PPUEXT)
  98. #
  99. # Graph
  100. #
  101. include $(GRAPHDIR)/makefile.inc
  102. GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
  103. graph$(PPUEXT) : graph.pp go32$(PPUEXT) ports$(PPUEXT) system$(PPUEXT) \
  104. $(GRAPHINCDEPS) vesa.inc vesah.inc dpmi.inc
  105. $(COMPILER) -I$(GRAPHDIR) graph.pp
  106. #
  107. # Delphi Compatible Units
  108. #
  109. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  110. objpas$(PPUEXT) dos$(PPUEXT) go32$(PPUEXT)
  111. $(COMPILER) -I$(OBJPASDIR) sysutils.pp
  112. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  113. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  114. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  115. $(COMPILER) $(OBJPASDIR)/math.pp
  116. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  117. $(OBJPASDIR)/varutilh.inc varutils.pp
  118. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  119. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. $(COMPILER) $(OBJPASDIR)/types.pp
  121. #
  122. # Other system-independent RTL Units
  123. #
  124. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  125. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  126. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  127. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  128. $(COMPILER) -Sg $(INC)/heaptrc.pp
  129. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  130. charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
  131. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT)
  132. #
  133. # Other system-dependent RTL Units
  134. #
  135. msmouse$(PPUEXT) : msmouse.pp system$(PPUEXT)
  136. callspec$(PPUEXT) : $(INC)/callspec.pp system$(PPUEXT)