Makefile.fpc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. #
  2. # Makefile.fpc for Watcom RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0
  8. #exceptn fpu
  9. units=system uuchar objpas macpas iso7185 extpas strings watcom dos \
  10. cpu charset cpall types getopts heaptrc lnfodwrf lineinfo ctypes fgl \
  11. math typinfo mmx sortbase \
  12. classes sysutils
  13. implicitunits=exeinfo \
  14. cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  15. cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
  16. cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
  17. cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
  18. cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u
  19. # dpmiexcp initc ports profile dxeload emu387 \
  20. # printer graph classes \
  21. # msmouse video mouse keyboard vesamode
  22. rsts=math typinfo classes sysconst
  23. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. fpcdir=../..
  29. target=watcom
  30. cpu=i386
  31. [compiler]
  32. includedir=$(INC) $(PROCINC)
  33. sourcedir=$(INC) $(PROCINC)
  34. [prerules]
  35. RTL=..
  36. INC=../inc
  37. PROCINC=../$(CPU_TARGET)
  38. UNITPREFIX=rtl
  39. SYSTEMUNIT=system
  40. # Use new feature from 1.0.5 version
  41. # that generates release PPU files
  42. # which will not be recompiled
  43. ifdef RELEASE
  44. override FPCOPT+=-Ur
  45. endif
  46. # Paths
  47. OBJPASDIR=$(RTL)/objpas
  48. GRAPHDIR=$(INC)/graph
  49. # Insert exception handler in system unit
  50. ifdef EXCEPTIONS_IN_SYSTEM
  51. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  52. endif
  53. # Insert exception handler in system unit
  54. # ifdef NO_EXCEPTIONS_IN_SYSTEM !!!!!!!!!!!!!!!!!!!!1
  55. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  56. # endif !!!!!!!!!!!!!!!!!!!!
  57. [rules]
  58. .NOTPARALLEL:
  59. # Get the system independent include file names.
  60. # This will set the following variables :
  61. # SYSINCNAMES
  62. include $(INC)/makefile.inc
  63. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  64. # Get the processor dependent include file names.
  65. # This will set the following variables :
  66. # CPUINCNAMES
  67. include $(PROCINC)/makefile.cpu
  68. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  69. # Put system unit dependencies together.
  70. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  71. #
  72. # Loaders
  73. #
  74. prt0$(OEXT) : prt0.as
  75. wasm prt0.as -fo=prt0$(OEXT) -bt=dos -5s -fp5 -ms -zq
  76. $(COPY) prt0$(OEXT) $(UNITTARGETDIRPREFIX)prt0$(OEXT)
  77. #
  78. # System Units (System, Objpas, Strings)
  79. #
  80. system$(PPUEXT) : system.pp $(SYSDEPS)
  81. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp
  82. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  83. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  84. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  85. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  86. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  87. system$(PPUEXT)
  88. #
  89. # System Dependent Units
  90. #
  91. watcom$(PPUEXT) : watcom.pp system$(PPUEXT)
  92. dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) system$(PPUEXT)
  93. $(COMPILER) -Sg dpmiexcp.pp
  94. initc$(PPUEXT) : initc.pp system$(PPUEXT)
  95. profile$(PPUEXT) : profile.pp dpmiexcp$(PPUEXT) watcom$(PPUEXT)
  96. dxeload$(PPUEXT) : dxeload.pp system$(PPUEXT)
  97. emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \
  98. dpmiexcp$(PPUEXT)
  99. ports$(PPUEXT) : ports.pp objpas$(PPUEXT) system$(PPUEXT)
  100. #
  101. # TP7 Compatible RTL Units
  102. #
  103. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
  104. watcom$(PPUEXT) strings$(PPUEXT) system$(PPUEXT)
  105. printer$(PPUEXT) : printer.pp system$(PPUEXT)
  106. #
  107. # Graph
  108. #
  109. #include $(GRAPHDIR)/makefile.inc
  110. #GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
  111. #graph$(PPUEXT) : graph.pp watcom$(PPUEXT) ports$(PPUEXT) system$(PPUEXT) \
  112. # $(GRAPHINCDEPS) vesa.inc vesah.inc dpmi.inc
  113. # $(COMPILER) -I$(GRAPHDIR) graph.pp
  114. #
  115. # Delphi Compatible Units
  116. #
  117. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  118. objpas$(PPUEXT) dos$(PPUEXT) watcom$(PPUEXT) sysconst$(PPUEXT)
  119. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  120. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  121. sysutils$(PPUEXT) typinfo$(PPUEXT) fgl$(PPUEXT) sortbase$(PPUEXT)
  122. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  123. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT) sortbase$(PPUEXT)
  124. $(COMPILER) $(OBJPASDIR)/fgl.pp
  125. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  126. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  127. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  128. $(COMPILER) $(OBJPASDIR)/math.pp
  129. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  130. $(COMPILER) $(OBJPASDIR)/types.pp
  131. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp
  132. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
  133. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT)
  134. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  135. #
  136. # Mac Pascal Model
  137. #
  138. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  139. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  140. #
  141. # Other system-independent RTL Units
  142. #
  143. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  144. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  145. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  146. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  147. $(COMPILER) -Sg $(INC)/heaptrc.pp
  148. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  149. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp system$(PPUEXT)
  150. charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
  151. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  152. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  153. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT)
  154. sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  155. $(COMPILER) $<
  156. #
  157. # Other system-dependent RTL Units
  158. #
  159. msmouse$(PPUEXT) : msmouse.pp system$(PPUEXT)
  160. ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)