Makefile.fpc 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. #
  2. # Makefile.fpc for Free Pascal EMX RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0 prt1
  8. units=$(SYSTEMUNIT) systhrds objpas macpas strings \
  9. ports os2def doscalls moncalls kbdcalls moucalls viocalls \
  10. pmbitmap pmwin pmgpi pmstddlg pmhelp pmdev pmspl pmshl pmwp pmwsock pmbidi \
  11. dos crt objects printer matrix \
  12. sysutils classes math typinfo varutils winsock \
  13. charset ucomplex cpu mmx getopts heaptrc lineinfo dynlibs \
  14. video mouse keyboard variants types rtlconst sysconst dateutil \
  15. strutils convutil ctypes
  16. rsts=math varutils typinfo variants pmhelp classes sysconst dateutil systhrds
  17. [require]
  18. nortl=y
  19. [install]
  20. fpcpackage=y
  21. [default]
  22. fpcdir=../..
  23. target=emx
  24. cpu=i386
  25. [compiler]
  26. includedir=$(INC) $(PROCINC) $(OS2INC)
  27. sourcedir=$(INC) $(PROCINC) $(OS2INC)
  28. [prerules]
  29. RTL=..
  30. INC=$(RTL)/inc
  31. PROCINC=$(RTL)/$(CPU_TARGET)
  32. OS2INC=$(RTL)/os2
  33. UNITPREFIX=rtl
  34. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  35. SYSTEMUNIT=system
  36. else
  37. SYSTEMUNIT=sysemx
  38. endif
  39. # Use new feature from 1.0.5 version
  40. # that generates release PPU files
  41. # which will not be recompiled
  42. ifdef RELEASE
  43. override FPCOPT+=-Ur
  44. endif
  45. # Paths
  46. OBJPASDIR=$(RTL)/objpas
  47. GRAPHDIR=$(INC)/graph
  48. [rules]
  49. # Get the system independent include file names.
  50. # This will set the following variables :
  51. # SYSINCNAMES
  52. include $(INC)/makefile.inc
  53. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  54. # Get the processor dependent include file names.
  55. # This will set the following variables :
  56. # CPUINCNAMES
  57. include $(PROCINC)/makefile.cpu
  58. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  59. # Put system unit dependencies together.
  60. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  61. #
  62. # Loaders
  63. #
  64. %$(OEXT) : %.as
  65. $(AS) -o $(UNITTARGETDIRPREFIX)$*$(OEXT) $*.as
  66. #
  67. # Base Units (System, strings, os-dependent-base-unit)
  68. #
  69. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pas $(SYSDEPS)
  70. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pas
  71. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(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. $(SYSTEMUNIT)$(PPUEXT)
  76. systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  77. #
  78. # System Dependent Units
  79. #
  80. ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  81. doscalls$(PPUEXT) : $(OS2INC)/doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  82. kbdcalls$(PPUEXT) : $(OS2INC)/kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT)
  83. moucalls$(PPUEXT) : $(OS2INC)/moucalls.pas $(SYSTEMUNIT)$(PPUEXT)
  84. moncalls$(PPUEXT) : $(OS2INC)/moncalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  85. os2def$(PPUEXT) : $(OS2INC)/os2def.pas $(SYSTEMUNIT)$(PPUEXT)
  86. pmwin$(PPUEXT) : $(OS2INC)/pmwin.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  87. pmbitmap$(PPUEXT) : $(OS2INC)/pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT)
  88. pmgpi$(PPUEXT) : $(OS2INC)/pmgpi.pas pmbitmap$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. pmstddlg$(PPUEXT) : $(OS2INC)/pmstddlg.pas os2def$(PPUEXT) doscalls$(PPUEXT) pmwin$(PPUEXT) pmgpi$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  90. pmhelp$(PPUEXT) : $(OS2INC)/pmhelp.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  91. pmdev$(PPUEXT) : $(OS2INC)/pmdev.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  92. pmspl$(PPUEXT) : $(OS2INC)/pmspl.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  93. pmshl$(PPUEXT) : $(OS2INC)/pmshl.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. pmwp$(PPUEXT) : $(OS2INC)/pmwp.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  95. pmwsock$(PPUEXT) : $(OS2INC)/pmwsock.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  96. winsock$(PPUEXT) : $(OS2INC)/winsock.pas pmwsock$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  97. pmbidi$(PPUEXT) : $(OS2INC)/pmbidi.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  98. dynlibs$(PPUEXT) : $(INC)/dynlibs.pp doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  99. #
  100. # TP7 Compatible RTL Units
  101. #
  102. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  103. doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  104. crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
  105. objects$(PPUEXT) : $(INC)/objects.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  106. printer$(PPUEXT) : $(OS2INC)/printer.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
  107. #graph$(PPUEXT) : graph.pp
  108. #
  109. # Delphi Compatible Units
  110. #
  111. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  112. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  113. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  114. classes$(PPUEXT) : $(OS2INC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  115. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  116. $(COMPILER) -Fi$(OBJPASDIR)/classes $(OS2INC)/classes.pp
  117. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  118. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  119. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. $(COMPILER) $(OBJPASDIR)/math.pp
  121. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  122. $(OBJPASDIR)/varutilh.inc $(OS2INC)/varutils.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  123. $(COMPILER) -I$(OBJPASDIR) $(OS2INC)/varutils.pp
  124. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. $(COMPILER) $(OBJPASDIR)/types.pp
  126. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  127. $(COMPILER) $(OBJPASDIR)/rtlconst.pp
  128. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  129. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  130. dateutil$(PPUEXT) : $(OBJPASDIR)/dateutil.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  131. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutil.pp
  132. convutil$(PPUEXT) : $(OBJPASDIR)/convutil.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutil.pp
  134. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  135. $(COMPILER) $(OBJPASDIR)/strutils.pp
  136. #
  137. # Mac Pascal Model
  138. #
  139. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  140. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  141. #
  142. # Other system-independent RTL Units
  143. #
  144. ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  145. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  146. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  147. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  148. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  149. $(COMPILER) -Sg $(INC)/heaptrc.pp
  150. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  151. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  152. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  153. #
  154. # Other system-dependent RTL Units
  155. #