Makefile.fpc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #
  2. # Makefile.fpc for Free Pascal Win16 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0s prt0t prt0m prt0c prt0l prt0h
  8. units=system uuchar objpas strings \
  9. wintypes winprocs win31
  10. [require]
  11. nortl=y
  12. [install]
  13. fpcpackage=y
  14. [default]
  15. fpcdir=../..
  16. target=msdos
  17. cpu=i8086
  18. [compiler]
  19. includedir=$(INC) $(PROCINC)
  20. sourcedir=$(INC) $(PROCINC) $(COMMON)
  21. [prerules]
  22. RTL=..
  23. INC=../inc
  24. COMMON=$(RTL)/common
  25. PROCINC=../$(CPU_TARGET)
  26. UNITPREFIX=rtl
  27. SYSTEMUNIT=system
  28. # Paths
  29. OBJPASDIR=$(RTL)/objpas
  30. # Insert exception handler in system unit
  31. ifdef EXCEPTIONS_IN_SYSTEM
  32. override FPCOPT+=-dEXCEPTIONS_IN_SYSTEM
  33. endif
  34. # Insert exception handler in system unit
  35. ifdef NO_EXCEPTIONS_IN_SYSTEM
  36. override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
  37. endif
  38. [rules]
  39. # Get the system independent include file names.
  40. # This will set the following variables :
  41. # SYSINCNAMES
  42. include $(INC)/makefile.inc
  43. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  44. # Get the processor dependent include file names.
  45. # This will set the following variables :
  46. # CPUINCNAMES
  47. include $(PROCINC)/makefile.cpu
  48. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  49. # Put system unit dependencies together.
  50. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  51. #
  52. # Loaders
  53. #
  54. prt0s$(OEXT) : prt0s.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  55. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0s$(OEXT) prt0s.asm
  56. prt0t$(OEXT) : prt0t.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  57. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0t$(OEXT) prt0t.asm
  58. prt0m$(OEXT) : prt0m.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  59. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0m$(OEXT) prt0m.asm
  60. prt0c$(OEXT) : prt0c.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  61. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0c$(OEXT) prt0c.asm
  62. prt0l$(OEXT) : prt0l.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  63. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
  64. prt0h$(OEXT) : prt0h.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
  65. $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
  66. #
  67. # System Units (System, Objpas, Strings)
  68. #
  69. system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc wintypes.inc winprocsh.inc winprocs.inc
  70. $(COMPILER) -Us -Sg system.pp
  71. $(EXECPPAS)
  72. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  73. $(COMPILER) $(INC)/uuchar.pp
  74. $(EXECPPAS)
  75. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  76. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  77. $(EXECPPAS)
  78. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  79. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  80. $(INC)/genstr.inc $(INC)/genstrs.inc \
  81. system$(PPUEXT)
  82. $(COMPILER) $(INC)/strings.pp
  83. $(EXECPPAS)
  84. #
  85. # WinAPI Units
  86. #
  87. wintypes$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT) wintypes.pp wintypes.inc
  88. $(COMPILER) wintypes.pp
  89. $(EXECPPAS)
  90. winprocs$(PPUEXT) : wintypes$(PPUEXT) winprocs.pp winprocsh.inc winprocs.inc
  91. $(COMPILER) winprocs.pp
  92. $(EXECPPAS)
  93. win31$(PPUEXT) : wintypes$(PPUEXT) win31.pp
  94. $(COMPILER) win31.pp
  95. $(EXECPPAS)