Makefile.fpc 3.9 KB

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