Makefile.fpc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. #
  2. # Makefile.fpc for Free Pascal QNX RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=cprt0 crti crtn
  8. units=system uuchar dos objpas objects strings \
  9. sysutils typinfo math \
  10. cpu mmx getopts heaptrc lineinfo posix
  11. rsts=math typinfo
  12. [require]
  13. nortl=y
  14. [install]
  15. fpcpackage=y
  16. [default]
  17. target=qnx
  18. cpu=i386
  19. [compiler]
  20. includedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
  21. sourcedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
  22. targetdir=.
  23. [prerules]
  24. RTL=..
  25. INC=$(RTL)/inc
  26. PROCINC=$(RTL)/$(CPU_TARGET)
  27. POSIXINC=$(RTL)/posix
  28. SYSCALLINC=$(RTL)/qnx/$(CPU_TARGET)
  29. UNITPREFIX=rtl
  30. SYSTEMUNIT=system
  31. # Use new feature from 1.0.5 version
  32. # that generates release PPU files
  33. # which will not be recompiled
  34. ifdef RELEASE
  35. override FPCOPT+=-Ur
  36. endif
  37. # Paths
  38. OBJPASDIR=$(RTL)/objpas
  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. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  56. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  57. crti$(OEXT) : $(CPU_TARGET)/crti.s
  58. $(AS) -o crti$(OEXT) $(CPU_TARGET)/crti.s
  59. crtn$(OEXT) : $(CPU_TARGET)/crtn.s
  60. $(AS) -o crtn$(OEXT) $(CPU_TARGET)/crtn.s
  61. func$(OEXT) : $(CPU_TARGET)/func.as
  62. $(AS) -o func$(OEXT) $(CPU_TARGET)/func.as
  63. dllprt$(OEXT) : $(CPU_TARGET)/dllprt.as
  64. $(AS) -o dllprt$(OEXT) $(CPU_TARGET)/dllprt.as
  65. #
  66. # system Units (system, Objpas, Strings)
  67. #
  68. system$(PPUEXT) : system.pp $(SYSDEPS)
  69. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg system.pp
  70. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  71. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  72. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  73. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  74. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  75. system$(PPUEXT)
  76. #
  77. # TP7 Compatible RTL Units
  78. #
  79. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  80. posix$(PPUEXT) system$(PPUEXT)
  81. $(COMPILER) $(POSIXINC)/dos.pp
  82. #
  83. # Delphi Compatible Units
  84. #
  85. sysutils$(PPUEXT) : $(POSIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  86. objpas$(PPUEXT) dos$(PPUEXT)
  87. $(COMPILER) -I$(OBJPASDIR) $(POSIXINC)/sysutils.pp
  88. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  89. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  90. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  91. $(COMPILER) $(OBJPASDIR)/math.pp
  92. #
  93. # Other system-independent RTL Units
  94. #
  95. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  96. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  97. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  98. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  99. $(COMPILER) -Sg $(INC)/heaptrc.pp
  100. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  101. #
  102. # Other system-dependent RTL Units
  103. #
  104. posix$(PPUEXT) : posix.pp \
  105. errno.inc osposix.inc osposixh.inc signal.inc system$(PPUEXT)