Makefile.fpc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #
  2. # Makefile.fpc for Free Pascal OS/2 RTL
  3. #
  4. [targets]
  5. loaders=prt0 prt1 code2 code3
  6. units=$(SYSTEMUNIT) objpas strings \
  7. os2def doscalls moncalls kbdcalls viocalls \
  8. dos crt objects printer \
  9. sysutils math typinfo \
  10. cpu mmx getopts heaptrc
  11. [packages]
  12. rtl=0
  13. [defaults]
  14. defaulttarget=os2
  15. defaultcpu=i386
  16. [dirs]
  17. fpcdir=.
  18. incdir=$(INC) $(PROCINC)
  19. targetdir=.
  20. [presettings]
  21. RTL=..
  22. INC=$(RTL)/inc
  23. PROCINC=$(RTL)/$(CPU_TARGET)
  24. UNITPREFIX=rtl
  25. # Paths
  26. OBJPASDIR=$(RTL)/objpas
  27. GRAPHDIR=$(INC)/graph
  28. # Define Go32v2 Units
  29. SYSTEMUNIT=sysos2
  30. [postsettings]
  31. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  32. # Get the system independent include file names.
  33. # This will set the following variables :
  34. # SYSINCNAMES
  35. include $(INC)/makefile.inc
  36. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  37. # Get the processor dependent include file names.
  38. # This will set the following variables :
  39. # CPUINCNAMES
  40. include $(PROCINC)/makefile.cpu
  41. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  42. # Put system unit dependencies together.
  43. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  44. [rules]
  45. vpath %.pas $(INC) $(PROCINC)
  46. vpath %.pp $(INC) $(PROCINC)
  47. #
  48. # Loaders
  49. #
  50. %$(OEXT) : %.as
  51. as -o $*$(OEXT) $*.as
  52. #
  53. # Base Units (System, strings, os-dependent-base-unit)
  54. #
  55. $(SYSTEMPPU) : sysos2.pas $(SYSDEPS)
  56. $(COMPILER) -Us -Sg sysos2.pas $(REDIR)
  57. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
  58. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  59. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  60. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  61. $(SYSTEMPPU)
  62. #
  63. # System Dependent Units
  64. #
  65. doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) objects$(PPUEXT) $(SYSTEMPPU)
  66. kbdcalls$(PPUEXT) : kbdcalls.pas $(SYSTEMPPU)
  67. moncalls$(PPUEXT) : moncalls.pas strings$(PPUEXT) $(SYSTEMPPU)
  68. #
  69. # TP7 Compatible RTL Units
  70. #
  71. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  72. $(SYSTEMPPU)
  73. crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMPPU)
  74. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  75. printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMPPU)
  76. #graph$(PPUEXT) : graph.pp
  77. #
  78. # Delphi Compatible Units
  79. #
  80. sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  81. filutil.inc disk.inc objpas$(PPUEXT)
  82. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
  83. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  84. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  85. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  86. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  87. #
  88. # Other system-independent RTL Units
  89. #
  90. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  91. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  92. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  93. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  94. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  95. #
  96. # Other system-dependent RTL Units
  97. #