Makefile.fpc 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. #
  2. # Makefile.fpc for Free Pascal Win32 RTL
  3. #
  4. [targets]
  5. loaders=wprt0 wdllprt0
  6. units=$(SYSTEMUNIT) objpas strings \
  7. windows ole2 opengl32 winsock \
  8. sockets initc \
  9. dos crt objects graph \
  10. sysutils typinfo math \
  11. cpu mmx getopts heaptrc wincrt winmouse
  12. [packages]
  13. rtl=0
  14. [defaults]
  15. defaulttarget=win32
  16. defaultcpu=i386
  17. [dirs]
  18. fpcdir=.
  19. incdir=$(INC) $(PROCINC)
  20. targetdir=.
  21. [presettings]
  22. RTL=..
  23. INC=$(RTL)/inc
  24. PROCINC=$(RTL)/$(CPU_TARGET)
  25. WININC=wininc
  26. UNITPREFIX=rtl
  27. # Paths
  28. OBJPASDIR=$(RTL)/objpas
  29. GRAPHDIR=$(INC)/graph
  30. SYSTEMUNIT=syswin32
  31. # Files used by windows.pp
  32. include $(WININC)/makefile.inc
  33. WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
  34. [postsettings]
  35. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  36. # Get the system independent include file names.
  37. # This will set the following variables :
  38. # SYSINCNAMES
  39. include $(INC)/makefile.inc
  40. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  41. # Get the processor dependent include file names.
  42. # This will set the following variables :
  43. # CPUINCNAMES
  44. include $(PROCINC)/makefile.cpu
  45. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  46. # Put system unit dependencies together.
  47. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  48. [rules]
  49. vpath %$(PASEXT) $(INC) $(PROCINC)
  50. #
  51. # Loaders
  52. #
  53. override AS=asw
  54. wprt0$(OEXT) : wprt0.as
  55. $(AS) -o wprt0$(OEXT) wprt0.as
  56. wdllprt0$(OEXT) : wdllprt0.as
  57. $(AS) -o wdllprt0$(OEXT) wdllprt0.as
  58. #
  59. # System Units (System, Objpas, Strings)
  60. #
  61. $(SYSTEMPPU) : syswin32.pp win32.inc $(SYSDEPS)
  62. $(COMPILER) -Us -Sg syswin32.pp $(REDIR)
  63. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
  64. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
  65. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  66. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  67. $(SYSTEMPPU)
  68. #
  69. # System Dependent Units
  70. #
  71. windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) $(SYSTEMPPU)
  72. $(COMPILER) -I$(WININC) windows.pp $(REDIR)
  73. ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMPPU)
  74. opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) $(SYSTEMPPU)
  75. winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) $(SYSTEMPPU)
  76. sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) $(SYSTEMPPU) \
  77. $(INC)/sockets.inc $(INC)/socketsh.inc
  78. initc$(PPUEXT) : initc.pp $(SYSTEMPPU)
  79. wincrt$(PPUEXT) : wincrt.pp $(SYSTEMPPU) windows$(PPUEXT) graph$(PPUEXT)
  80. winmouse$(PPUEXT) : winmouse.pp $(SYSTEMPPU) windows$(PPUEXT) graph$(PPUEXT)
  81. #
  82. # TP7 Compatible RTL Units
  83. #
  84. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMPPU)
  85. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMPPU) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
  86. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
  87. #
  88. # Graph
  89. #
  90. include $(GRAPHDIR)/makefile.inc
  91. GRAPHINCDEPS=$(addprefix $(GRAPHDIR)/,$(GRAPHINCNAMES))
  92. graph$(PPUEXT) : $(GRAPHDIR)/graph.pp $(SYSTEMPPU) \
  93. $(GRAPHINCDEPS) graph.inc graphh.inc
  94. $(COMPILER) -I$(GRAPHDIR) $(GRAPHDIR)/graph.pp $(REDIR)
  95. #
  96. # Delphi Compatible Units
  97. #
  98. sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  99. filutil.inc disk.inc objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
  100. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
  101. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  102. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
  103. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  104. $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
  105. #
  106. # Other system-independent RTL Units
  107. #
  108. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
  109. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
  110. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
  111. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
  112. $(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
  113. #
  114. # Other system-dependent RTL Units
  115. #