Makefile.fpc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. fpcdir=../..
  18. target=qnx
  19. cpu=i386
  20. [compiler]
  21. includedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
  22. sourcedir=$(INC) $(PROCINC) $(POSIXINC) $(SYSCALLINC)
  23. targetdir=.
  24. [prerules]
  25. RTL=..
  26. INC=$(RTL)/inc
  27. PROCINC=$(RTL)/$(CPU_TARGET)
  28. POSIXINC=$(RTL)/posix
  29. SYSCALLINC=$(RTL)/qnx/$(CPU_TARGET)
  30. UNITPREFIX=rtl
  31. SYSTEMUNIT=system
  32. # Use new feature from 1.0.5 version
  33. # that generates release PPU files
  34. # which will not be recompiled
  35. ifdef RELEASE
  36. ifeq ($(findstring 1.0.2,$(FPC_VERSION)),)
  37. ifeq ($(findstring 1.0.4,$(FPC_VERSION)),)
  38. override FPCOPT+=-Ur
  39. endif
  40. endif
  41. endif
  42. # Paths
  43. OBJPASDIR=$(RTL)/objpas
  44. GRAPHDIR=$(INC)/graph
  45. [rules]
  46. # Get the system independent include file names.
  47. # This will set the following variables :
  48. # SYSINCNAMES
  49. include $(INC)/makefile.inc
  50. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  51. # Get the processor dependent include file names.
  52. # This will set the following variables :
  53. # CPUINCNAMES
  54. include $(PROCINC)/makefile.cpu
  55. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  56. # Put system unit dependencies together.
  57. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  58. #
  59. # Loaders
  60. #
  61. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  62. $(AS) -o cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  63. crti$(OEXT) : $(CPU_TARGET)/crti.s
  64. $(AS) -o crti$(OEXT) $(CPU_TARGET)/crti.s
  65. crtn$(OEXT) : $(CPU_TARGET)/crtn.s
  66. $(AS) -o crtn$(OEXT) $(CPU_TARGET)/crtn.s
  67. func$(OEXT) : $(CPU_TARGET)/func.as
  68. $(AS) -o func$(OEXT) $(CPU_TARGET)/func.as
  69. dllprt$(OEXT) : $(CPU_TARGET)/dllprt.as
  70. $(AS) -o dllprt$(OEXT) $(CPU_TARGET)/dllprt.as
  71. #
  72. # system Units (system, Objpas, Strings)
  73. #
  74. system$(PPUEXT) : system.pp $(SYSDEPS)
  75. $(COMPILER) -Us -Sg system.pp
  76. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  77. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  78. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  79. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  80. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  81. system$(PPUEXT)
  82. #
  83. # TP7 Compatible RTL Units
  84. #
  85. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  86. posix$(PPUEXT) system$(PPUEXT)
  87. $(COMPILER) $(POSIXINC)/dos.pp
  88. #
  89. # Delphi Compatible Units
  90. #
  91. sysutils$(PPUEXT) : $(POSIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  92. objpas$(PPUEXT) dos$(PPUEXT)
  93. $(COMPILER) -I$(OBJPASDIR) $(POSIXINC)/sysutils.pp
  94. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  95. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  96. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  97. $(COMPILER) $(OBJPASDIR)/math.pp
  98. #
  99. # Other system-independent RTL Units
  100. #
  101. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  102. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  103. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  104. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  105. $(COMPILER) -Sg $(INC)/heaptrc.pp
  106. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  107. #
  108. # Other system-dependent RTL Units
  109. #
  110. posix$(PPUEXT) : posix.pp \
  111. errno.inc osposix.inc osposixh.inc signal.inc system$(PPUEXT)