Makefile.fpc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. #
  2. # Makefile.fpc for Free Pascal Win32 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=$(LOADERS)
  8. units=system ctypes objpas macpas strings \
  9. lineinfo heaptrc matrix \
  10. windows winsock winsock2 initc cmem dynlibs signals \
  11. dos crt objects messages \
  12. rtlconsts sysconst sysutils math types \
  13. strutils convutils dateutils varutils variants typinfo classes \
  14. cpu mmx charset ucomplex getopts \
  15. winevent sockets printer \
  16. video mouse keyboard \
  17. winsysut fpmkunit
  18. rsts=math varutils typinfo variants classes dateutils sysconst fpmkunit
  19. [require]
  20. nortl=y
  21. [install]
  22. fpcpackage=y
  23. [default]
  24. fpcdir=../..
  25. target=win32
  26. [compiler]
  27. includedir=$(INC) $(PROCINC)
  28. sourcedir=$(INC) $(PROCINC) $(COMMON)
  29. [prerules]
  30. RTL=..
  31. INC=$(RTL)/inc
  32. COMMON=$(RTL)/common
  33. PROCINC=$(RTL)/$(CPU_TARGET)
  34. WININC=../win/wininc
  35. WINDIR=../win
  36. UNITPREFIX=rtl
  37. ifneq ($(findstring 2.0.,$(FPC_VERSION)),)
  38. LOADERS=wprt0 wdllprt0 gprt0 wcygprt0
  39. endif
  40. # Paths
  41. OBJPASDIR=$(RTL)/objpas
  42. # Files used by windows.pp
  43. include $(WININC)/makefile.inc
  44. WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
  45. [rules]
  46. SYSTEMPPU=$(addsuffix $(PPUEXT),system)
  47. # Get the system independent include file names.
  48. # This will set the following variables :
  49. # SYSINCNAMES
  50. include $(INC)/makefile.inc
  51. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  52. # Get the processor dependent include file names.
  53. # This will set the following variables :
  54. # CPUINCNAMES
  55. include $(PROCINC)/makefile.cpu
  56. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  57. # Put system unit dependencies together.
  58. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  59. #
  60. # Loaders
  61. #
  62. wprt0$(OEXT) : wprt0.as
  63. gprt0$(OEXT) : gprt0.as
  64. wdllprt0$(OEXT) : wdllprt0.as
  65. wcygprt0$(OEXT) : wcygprt0.as
  66. #
  67. # System Units (System, Objpas, Strings)
  68. #
  69. system$(PPUEXT) : system.pp $(SYSDEPS)
  70. $(COMPILER) -Us -Sg system.pp -Fi../win
  71. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc system$(PPUEXT)
  72. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  73. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  74. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  75. system$(PPUEXT)
  76. #
  77. # System Dependent Units
  78. #
  79. windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) system$(PPUEXT)
  80. $(COMPILER) -I$(WININC) windows.pp
  81. messages$(PPUEXT): messages.pp $(WININC)/messages.inc system$(PPUEXT)
  82. $(COMPILER) -I$(WININC) messages.pp
  83. opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) system$(PPUEXT)
  84. winsock$(PPUEXT) : $(WINDIR)/winsock.pp windows$(PPUEXT) system$(PPUEXT)
  85. $(COMPILER) $(WINDIR)/winsock.pp
  86. winsock2$(PPUEXT) : winsock2.pp windows$(PPUEXT) system$(PPUEXT)
  87. sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) winsock2$(PPUEXT) system$(PPUEXT) \
  88. $(INC)/sockets.inc $(INC)/socketsh.inc
  89. initc$(PPUEXT) : initc.pp system$(PPUEXT)
  90. dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  91. #
  92. # TP7 Compatible RTL Units
  93. #
  94. dos$(PPUEXT) : $(WINDIR)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) system$(PPUEXT)
  95. $(COMPILER) $(WINDIR)/dos.pp
  96. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc system$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
  97. objects$(PPUEXT) : $(INC)/objects.pp system$(PPUEXT)
  98. #
  99. # Delphi Compatible Units
  100. #
  101. sysutils$(PPUEXT) : $(WINDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  102. objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT)
  103. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(WINDIR)/sysutils.pp
  104. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  105. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT)
  106. $(COMPILER) -Fi../win -Fi$(OBJPASDIR)/classes classes.pp
  107. winsysut$(PPUEXT) : winsysut.pp sysutils$(PPUEXT)
  108. $(COMPILER) winsysut.pp
  109. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  110. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  111. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  112. $(COMPILER) $(OBJPASDIR)/math.pp
  113. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  114. $(OBJPASDIR)/varutilh.inc $(WINDIR)/varutils.pp sysutils$(PPUEXT)
  115. $(COMPILER) -Fi$(OBJPASDIR) $(WINDIR)/varutils.pp
  116. variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT)
  117. $(COMPILER) -Fi$(INC) $(INC)/variants.pp
  118. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) system$(PPUEXT)
  119. $(COMPILER) $(OBJPASDIR)/types.pp
  120. rtlconsts$(PPUEXT) : objpas$(PPUEXT) $(OBJPASDIR)/rtlconsts.pp
  121. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  122. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) system$(PPUEXT)
  123. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  124. dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
  125. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  126. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp
  127. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutils.pp
  128. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
  129. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/strutils.pp
  130. #
  131. # Mac Pascal Model
  132. #
  133. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  134. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  135. #
  136. # Other system-independent RTL Units
  137. #
  138. cpu$(PPUEXT) : $(PROCINC)/cpu.pp system$(PPUEXT)
  139. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) system$(PPUEXT)
  140. getopts$(PPUEXT) : $(INC)/getopts.pp system$(PPUEXT)
  141. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp system$(PPUEXT)
  142. $(COMPILER) -Sg $(INC)/heaptrc.pp
  143. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
  144. charset$(PPUEXT) : $(INC)/charset.pp system$(PPUEXT)
  145. cmem$(PPUEXT) : $(INC)/cmem.pp system$(PPUEXT)
  146. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) system$(PPUEXT)
  147. fpmkunit$(PPUEXT) : $(COMMON)/fpmkunit.pp classes$(PPUEXT)
  148. #
  149. # Other system-dependent RTL Units
  150. #
  151. callspec$(PPUEXT) : $(INC)/callspec.pp system$(PPUEXT)
  152. ctypes$(PPUEXT) : $(INC)/ctypes.pp system$(PPUEXT)
  153. variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) typinfo$(PPUEXT)