Makefile.fpc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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
  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 $(COMPILER_UNITTARGETDIR)
  56. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0s$(OEXT) prt0s.asm
  57. prt0m$(OEXT) : prt0m.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  58. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0m$(OEXT) prt0m.asm
  59. prt0c$(OEXT) : prt0c.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  60. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0c$(OEXT) prt0c.asm
  61. prt0l$(OEXT) : prt0l.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  62. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
  63. prt0h$(OEXT) : prt0h.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  64. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
  65. #
  66. # System Units (System, Objpas, Strings)
  67. #
  68. system$(PPUEXT) : system.pp $(SYSDEPS) wintypes.inc winprocsh.inc winprocs.inc \
  69. glbheap.inc glbheaph.inc locheap.inc locheaph.inc \
  70. sysdl.inc sysdlh.inc
  71. $(COMPILER) -Us -Sg system.pp
  72. $(EXECPPAS)
  73. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  74. $(COMPILER) $(INC)/uuchar.pp
  75. $(EXECPPAS)
  76. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  77. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  78. $(EXECPPAS)
  79. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  80. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  81. $(INC)/genstr.inc $(INC)/genstrs.inc \
  82. system$(PPUEXT)
  83. $(COMPILER) $(INC)/strings.pp
  84. $(EXECPPAS)
  85. iso7185$(PPUEXT) : $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  86. $(COMPILER) $(INC)/iso7185.pp
  87. $(EXECPPAS)
  88. extpas$(PPUEXT) : $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. $(COMPILER) $(INC)/extpas.pp
  90. $(EXECPPAS)
  91. #
  92. # WinAPI Units
  93. #
  94. wintypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) wintypes.pp wintypes.inc
  95. $(COMPILER) wintypes.pp
  96. $(EXECPPAS)
  97. winprocs$(PPUEXT) : wintypes$(PPUEXT) winprocs.pp winprocsh.inc winprocs.inc
  98. $(COMPILER) winprocs.pp
  99. $(EXECPPAS)
  100. win31$(PPUEXT) : wintypes$(PPUEXT) win31.pp
  101. $(COMPILER) win31.pp
  102. $(EXECPPAS)
  103. #
  104. # $(SYSTEMUNIT) Dependent Units
  105. #
  106. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas dynlibs.inc objpas$(PPUEXT)
  107. $(COMPILER) $(INC)/dynlibs.pas
  108. #
  109. # TP7 Compatible RTL Units
  110. #
  111. dos$(PPUEXT) : dos.pp registers.inc \
  112. $(INC)/dosh.inc $(INC)/dos.inc $(INC)/fexpand.inc \
  113. strings$(PPUEXT) wintypes$(PPUEXT) winprocs$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. $(COMPILER) dos.pp
  115. $(EXECPPAS)
  116. #
  117. # Delphi Compatible Units
  118. #
  119. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT)
  120. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  121. $(EXECPPAS)
  122. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp $(OBJPASDIR)/rtlconst.inc objpas$(PPUEXT)
  123. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
  124. $(EXECPPAS)