Makefile.fpc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. #
  2. # Makefile.fpc for Free Pascal Win32 RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=wprt0 wdllprt0 gprt0 wcygprt0
  8. units=$(SYSTEMUNIT) ctypes objpas macpas strings \
  9. lineinfo heaptrc matrix \
  10. windows winsock 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=wininc
  35. UNITPREFIX=rtl
  36. SYSTEMUNIT=system
  37. PRT0=wprt0
  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. # Files used by windows.pp
  47. include $(WININC)/makefile.inc
  48. WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
  49. [rules]
  50. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  51. # Get the system independent include file names.
  52. # This will set the following variables :
  53. # SYSINCNAMES
  54. include $(INC)/makefile.inc
  55. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  56. # Get the processor dependent include file names.
  57. # This will set the following variables :
  58. # CPUINCNAMES
  59. include $(PROCINC)/makefile.cpu
  60. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  61. # Put system unit dependencies together.
  62. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  63. #
  64. # Loaders
  65. #
  66. wprt0$(OEXT) : $(PRT0).as
  67. $(AS) -o $(UNITTARGETDIRPREFIX)wprt0$(OEXT) $(PRT0).as
  68. gprt0$(OEXT) : gprt0.as
  69. wdllprt0$(OEXT) : wdllprt0.as
  70. wcygprt0$(OEXT) : wcygprt0.as
  71. #
  72. # System Units (System, Objpas, Strings)
  73. #
  74. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
  75. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp -Fi../win
  76. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  77. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  78. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  79. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  80. $(SYSTEMUNIT)$(PPUEXT)
  81. #
  82. # System Dependent Units
  83. #
  84. windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) $(SYSTEMUNIT)$(PPUEXT)
  85. $(COMPILER) -I$(WININC) windows.pp
  86. messages$(PPUEXT): messages.pp $(WININC)/messages.inc $(SYSTEMUNIT)$(PPUEXT)
  87. $(COMPILER) -I$(WININC) messages.pp
  88. opengl32$(PPUEXT) : opengl32.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. winsock$(PPUEXT) : winsock.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  90. sockets$(PPUEXT) : sockets.pp windows$(PPUEXT) winsock$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  91. $(INC)/sockets.inc $(INC)/socketsh.inc
  92. initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT)
  93. dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  94. #
  95. # TP7 Compatible RTL Units
  96. #
  97. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  98. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT)
  99. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  100. #
  101. # Delphi Compatible Units
  102. #
  103. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  104. objpas$(PPUEXT) dos$(PPUEXT) windows$(PPUEXT) sysconst$(PPUEXT)
  105. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  106. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  107. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) sysconst$(PPUEXT)
  108. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  109. winsysut$(PPUEXT) : winsysut.pp sysutils$(PPUEXT)
  110. $(COMPILER) winsysut.pp
  111. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  112. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  113. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  114. $(COMPILER) $(OBJPASDIR)/math.pp
  115. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  116. $(OBJPASDIR)/varutilh.inc varutils.pp sysutils$(PPUEXT)
  117. $(COMPILER) -Fi$(OBJPASDIR) varutils.pp
  118. variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) sysutils$(PPUEXT) sysconst$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT)
  119. $(COMPILER) -Fi$(INC) $(INC)/variants.pp
  120. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  121. $(COMPILER) $(OBJPASDIR)/types.pp
  122. rtlconsts$(PPUEXT) : objpas$(PPUEXT) $(OBJPASDIR)/rtlconsts.pp
  123. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  124. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  126. dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
  127. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  128. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp
  129. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutils.pp
  130. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
  131. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/strutils.pp
  132. #
  133. # Mac Pascal Model
  134. #
  135. macpas$(PPUEXT) : $(INC)/macpas.pp $(SYSTEMUNIT)$(PPUEXT)
  136. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  137. #
  138. # Other system-independent RTL Units
  139. #
  140. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  141. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  142. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  143. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  144. $(COMPILER) -Sg $(INC)/heaptrc.pp
  145. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  146. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  147. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  148. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  149. fpmkunit$(PPUEXT) : $(COMMON)/fpmkunit.pp classes$(PPUEXT)
  150. #
  151. # Other system-dependent RTL Units
  152. #
  153. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  154. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  155. variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT) typinfo$(PPUEXT)