Makefile.fpc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #
  2. # Makefile.fpc for Free Pascal Win16 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0s prt0m prt0c prt0l prt0h
  8. units=system uuchar objpas strings iso7185 extpas dos \
  9. wintypes winprocs win31 dynlibs \
  10. sysconst rtlconst sysutils math types typinfo fgl classes
  11. [require]
  12. nortl=y
  13. [install]
  14. fpcpackage=y
  15. [default]
  16. fpcdir=../..
  17. target=msdos
  18. cpu=i8086
  19. [compiler]
  20. includedir=$(INC) $(PROCINC)
  21. sourcedir=$(INC) $(PROCINC) $(COMMON)
  22. [prerules]
  23. RTL=..
  24. INC=../inc
  25. COMMON=$(RTL)/common
  26. PROCINC=../$(CPU_TARGET)
  27. UNITPREFIX=rtl
  28. SYSTEMUNIT=system
  29. # Paths
  30. OBJPASDIR=$(RTL)/objpas
  31. # Insert exception handler in system unit
  32. ifdef EXCEPTIONS_IN_SYSTEM
  33. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  34. endif
  35. # Insert exception handler in system unit
  36. ifdef NO_EXCEPTIONS_IN_SYSTEM
  37. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  38. endif
  39. [rules]
  40. # Get the system independent include file names.
  41. # This will set the following variables :
  42. # SYSINCNAMES
  43. include $(INC)/makefile.inc
  44. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  45. # Get the processor dependent include file names.
  46. # This will set the following variables :
  47. # CPUINCNAMES
  48. include $(PROCINC)/makefile.cpu
  49. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  50. # Put system unit dependencies together.
  51. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  52. #
  53. # Loaders
  54. #
  55. prt0s$(OEXT) : prt0s.asm prt0comn.asm
  56. $(MAKE) $(COMPILER_UNITTARGETDIR)
  57. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0s$(OEXT) prt0s.asm
  58. prt0m$(OEXT) : prt0m.asm prt0comn.asm
  59. $(MAKE) $(COMPILER_UNITTARGETDIR)
  60. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0m$(OEXT) prt0m.asm
  61. prt0c$(OEXT) : prt0c.asm prt0comn.asm
  62. $(MAKE) $(COMPILER_UNITTARGETDIR)
  63. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0c$(OEXT) prt0c.asm
  64. prt0l$(OEXT) : prt0l.asm prt0comn.asm
  65. $(MAKE) $(COMPILER_UNITTARGETDIR)
  66. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
  67. prt0h$(OEXT) : prt0h.asm prt0comn.asm
  68. $(MAKE) $(COMPILER_UNITTARGETDIR)
  69. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
  70. #
  71. # System Units (System, Objpas, Strings)
  72. #
  73. system$(PPUEXT) : system.pp $(SYSDEPS) wintypes.inc winprocsh.inc winprocs.inc \
  74. glbheap.inc glbheaph.inc locheap.inc locheaph.inc \
  75. sysdl.inc sysdlh.inc
  76. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp
  77. $(EXECPPAS)
  78. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  79. $(COMPILER) $(INC)/uuchar.pp
  80. $(EXECPPAS)
  81. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  82. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  83. $(EXECPPAS)
  84. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  85. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  86. $(INC)/genstr.inc $(INC)/genstrs.inc \
  87. system$(PPUEXT)
  88. $(COMPILER) $(INC)/strings.pp
  89. $(EXECPPAS)
  90. iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  91. $(COMPILER) $(INC)/iso7185.pp
  92. $(EXECPPAS)
  93. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. $(COMPILER) $(INC)/extpas.pp
  95. $(EXECPPAS)
  96. #
  97. # WinAPI Units
  98. #
  99. wintypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) wintypes.pp wintypes.inc
  100. $(COMPILER) wintypes.pp
  101. $(EXECPPAS)
  102. winprocs$(PPUEXT) : wintypes$(PPUEXT) winprocs.pp winprocsh.inc winprocs.inc
  103. $(COMPILER) winprocs.pp
  104. $(EXECPPAS)
  105. win31$(PPUEXT) : wintypes$(PPUEXT) win31.pp
  106. $(COMPILER) win31.pp
  107. $(EXECPPAS)
  108. #
  109. # $(SYSTEMUNIT) Dependent Units
  110. #
  111. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas dynlibs.inc objpas$(PPUEXT)
  112. $(COMPILER) $(INC)/dynlibs.pas
  113. #
  114. # TP7 Compatible RTL Units
  115. #
  116. dos$(PPUEXT) : dos.pp registers.inc \
  117. $(INC)/dosh.inc $(INC)/dos.inc $(INC)/fexpand.inc \
  118. strings$(PPUEXT) wintypes$(PPUEXT) winprocs$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  119. $(COMPILER) dos.pp
  120. $(EXECPPAS)
  121. #
  122. # Delphi Compatible Units
  123. #
  124. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  125. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) \
  126. wintypes$(PPUEXT) winprocs$(PPUEXT)
  127. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  128. $(EXECPPAS)
  129. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  130. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) \
  131. types$(PPUEXT) fgl$(PPUEXT) objpas$(PPUEXT) \
  132. winprocs$(PPUEXT) wintypes$(PPUEXT)
  133. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  134. $(EXECPPAS)
  135. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp types$(PPUEXT) sysutils$(PPUEXT) rtlconst$(PPUEXT) objpas$(PPUEXT)
  136. $(COMPILER) $(OBJPASDIR)/fgl.pp
  137. $(EXECPPAS)
  138. math$(PPUEXT): $(OBJPASDIR)/math.pp $(PROCINC)/mathu.inc objpas$(PPUEXT) sysutils$(PPUEXT) system$(PPUEXT)
  139. $(COMPILER) $(OBJPASDIR)/math.pp
  140. $(EXECPPAS)
  141. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp sysutils$(PPUEXT) objpas$(PPUEXT) rtlconst$(PPUEXT)
  142. $(COMPILER) -Sg -Fi$(OBJPASDIR) $(OBJPASDIR)/typinfo.pp
  143. $(EXECPPAS)
  144. types$(PPUEXT) : $(OBJPASDIR)/types.pp math$(PPUEXT) wintypes$(PPUEXT) objpas$(PPUEXT)
  145. $(COMPILER) $(OBJPASDIR)/types.pp
  146. $(EXECPPAS)
  147. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT)
  148. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  149. $(EXECPPAS)
  150. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp $(OBJPASDIR)/rtlconst.inc objpas$(PPUEXT)
  151. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
  152. $(EXECPPAS)