Makefile.fpc 5.5 KB

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