Makefile.fpc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. #
  2. # Makefile.fpc for Watcom RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0
  8. #exceptn fpu
  9. units=system objpas macpas strings watcom dos crt objects \
  10. cpu charset types getopts heaptrc lnfodwrf lineinfo ctypes fgl
  11. # math typinfo mmx ucomplex \
  12. # varutils variants sysutils
  13. # dpmiexcp initc ports profile dxeload emu387 \
  14. # printer graph classes \
  15. # msmouse video mouse keyboard vesamode
  16. rsts=math varutils typinfo classes variants sysconst
  17. [require]
  18. nortl=y
  19. [install]
  20. fpcpackage=y
  21. [default]
  22. fpcdir=../..
  23. target=watcom
  24. cpu=i386
  25. [compiler]
  26. includedir=$(INC) $(PROCINC)
  27. sourcedir=$(INC) $(PROCINC)
  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 !!!!!!!!!!!!!!!!!!!!1
  48. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  49. # endif !!!!!!!!!!!!!!!!!!!!
  50. [rules]
  51. .NOTPARALLEL:
  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. #
  65. # Loaders
  66. #
  67. prt0$(OEXT) : prt0.asm
  68. wasm prt0.asm -bt=dos -5s -fp5 -ms -zq
  69. #
  70. # System Units (System, Objpas, Strings)
  71. #
  72. system$(PPUEXT) : system.pp $(SYSDEPS)
  73. $(COMPILER) -Us -Sg system.pp
  74. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  75. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  76. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  77. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  78. system$(PPUEXT)
  79. #
  80. # System Dependent Units
  81. #
  82. watcom$(PPUEXT) : watcom.pp system$(PPUEXT)
  83. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) system$(PPUEXT)
  84. $(COMPILER) -Sg dpmiexcp.pp
  85. initc$(PPUEXT) : initc.pp system$(PPUEXT)
  86. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) watcom$(PPUEXT)
  87. dxeload$(PPUEXT) : dxeload.pp system$(PPUEXT)
  88. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  89. dpmiexcp$(PPUEXT)
  90. ports$(PPUEXT) : ports.pp objpas$(PPUEXT) system$(PPUEXT)
  91. #
  92. # TP7 Compatible RTL Units
  93. #
  94. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  95. watcom$(PPUEXT) strings$(PPUEXT) system$(PPUEXT)
  96. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc watcom$(PPUEXT) system$(PPUEXT)
  97. objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT)
  98. printer$(PPUEXT) : printer.pp system$(PPUEXT)
  99. #
  100. # Graph
  101. #
  102. include $(GRAPHDIR)/makefile.inc
  103. GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
  104. graph$(PPUEXT) : graph.pp watcom$(PPUEXT) ports$(PPUEXT) system$(PPUEXT) \
  105. $(GRAPHINCDEPS) vesa.inc vesah.inc dpmi.inc
  106. $(COMPILER) -I$(GRAPHDIR) graph.pp
  107. #
  108. # Delphi Compatible Units
  109. #
  110. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  111. objpas$(PPUEXT) dos$(PPUEXT) watcom$(PPUEXT) sysconst$(PPUEXT)
  112. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  113. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  114. sysutils$(PPUEXT) typinfo$(PPUEXT) fgl$(PPUEXT)
  115. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  116. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  117. $(COMPILER) $(OBJPASDIR)/fgl.pp
  118. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  119. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  120. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  121. $(COMPILER) $(OBJPASDIR)/math.pp
  122. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  123. $(OBJPASDIR)/varutilh.inc varutils.pp
  124. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  125. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  126. $(COMPILER) $(OBJPASDIR)/types.pp
  127. #
  128. # Mac Pascal Model
  129. #
  130. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  131. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  132. #
  133. # Other system-independent RTL Units
  134. #
  135. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  136. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  137. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  138. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  139. $(COMPILER) -Sg $(INC)/heaptrc.pp
  140. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  141. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp system$(PPUEXT)
  142. charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
  143. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT)
  144. #
  145. # Other system-dependent RTL Units
  146. #
  147. msmouse$(PPUEXT) : msmouse.pp system$(PPUEXT)
  148. ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)