Makefile.fpc 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. #
  2. # Makefile.fpc for Free Pascal OS/2 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0 prt1 code2 code3
  8. units=$(SYSTEMUNIT) objpas strings \
  9. ports os2def doscalls moncalls kbdcalls moucalls viocalls \
  10. pmbitmap pmwin pmgpi dive \
  11. dos crt objects printer \
  12. sysutils math typinfo varutils \
  13. ucomplex cpu mmx getopts heaptrc lineinfo dynlibs \
  14. video mouse keyboard
  15. rsts=math varutils typinfo
  16. [require]
  17. nortl=y
  18. [install]
  19. fpcpackage=y
  20. [default]
  21. fpcdir=../..
  22. target=os2
  23. cpu=i386
  24. [compiler]
  25. includedir=$(INC) $(PROCINC)
  26. sourcedir=$(INC) $(PROCINC)
  27. targetdir=.
  28. [prerules]
  29. RTL=..
  30. INC=$(RTL)/inc
  31. PROCINC=$(RTL)/$(CPU_TARGET)
  32. UNITPREFIX=rtl
  33. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  34. SYSTEMUNIT=system
  35. else
  36. SYSTEMUNIT=sysos2
  37. endif
  38. # Use new feature from 1.0.5 version
  39. # that generates release PPU files
  40. # which will not be recompiled
  41. ifdef RELEASE
  42. override FPCOPT+=-Ur
  43. endif
  44. # Paths
  45. OBJPASDIR=$(RTL)/objpas
  46. GRAPHDIR=$(INC)/graph
  47. [rules]
  48. # Get the system independent include file names.
  49. # This will set the following variables :
  50. # SYSINCNAMES
  51. include $(INC)/makefile.inc
  52. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  53. # Get the processor dependent include file names.
  54. # This will set the following variables :
  55. # CPUINCNAMES
  56. include $(PROCINC)/makefile.cpu
  57. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  58. # Put system unit dependencies together.
  59. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  60. #
  61. # Loaders
  62. #
  63. %$(OEXT) : %.as
  64. $(AS) -o $*$(OEXT) $*.as
  65. #
  66. # Base Units (System, strings, os-dependent-base-unit)
  67. #
  68. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pas $(SYSDEPS)
  69. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pas $(REDIR)
  70. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  71. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  72. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  73. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  74. $(SYSTEMUNIT)$(PPUEXT)
  75. #
  76. # System Dependent Units
  77. #
  78. ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  79. doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) objects$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  80. kbdcalls$(PPUEXT) : kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT)
  81. moucalls$(PPUEXT) : moucalls.pas $(SYSTEMUNIT)$(PPUEXT)
  82. moncalls$(PPUEXT) : moncalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  83. os2def$(PPUEXT) : os2def.pas $(SYSTEMUNIT)$(PPUEXT)
  84. pmwin$(PPUEXT) : pmwin.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  85. pmbitmap$(PPUEXT) : pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT)
  86. pmgpi$(PPUEXT) : pmgpi.pas pmbitmap$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  87. dive$(PPUEXT) : dive.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  88. dynlibs$(PPUEXT) : $(INC)/dynlibs.pp doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. #
  90. # TP7 Compatible RTL Units
  91. #
  92. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  93. doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
  95. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMUNIT)$(PPUEXT)
  96. printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
  97. #graph$(PPUEXT) : graph.pp
  98. #
  99. # Delphi Compatible Units
  100. #
  101. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  102. objpas$(PPUEXT) dos$(PPUEXT) doscalls$(PPUEXT)
  103. $(COMPILER) -I$(OBJPASDIR) sysutils.pp $(REDIR)
  104. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  105. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  106. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  107. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  108. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  109. $(OBJPASDIR)/varutilh.inc varutils.pp
  110. $(COMPILER) -I$(OBJPASDIR) varutils.pp $(REDIR)
  111. #
  112. # Other system-independent RTL Units
  113. #
  114. ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  115. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  116. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  117. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  118. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  119. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  120. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  121. #
  122. # Other system-dependent RTL Units
  123. #