Makefile.fpc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. #
  2. # Makefile.fpc for Free Pascal EMX RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=prt0 prt1
  8. units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 extpas strings \
  9. ports os2def doscalls doscall2 moncalls kbdcalls moucalls viocalls \
  10. pmbitmap pmwin pmgpi pmstddlg pmhelp pmdev pmspl pmshl pmwp pmwsock pmbidi \
  11. dos \
  12. sysutils classes fgl math typinfo \
  13. charset cpall cpu mmx getopts heaptrc lnfodwrf lineinfo dynlibs \
  14. types rtlconst sysconst \
  15. ctypes
  16. rsts=math typinfo pmhelp classes sysconst
  17. implicitunits=exeinfo \
  18. cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  19. cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
  20. cp863 cp864 cp865 cp866 cp869 cp874 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
  21. cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
  22. cp8859_13 cp8859_14 cp8859_15 cp8859_16
  23. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. fpcdir=../..
  29. target=emx
  30. cpu=i386
  31. [compiler]
  32. includedir=$(INC) $(PROCINC) $(OS2INC)
  33. sourcedir=$(INC) $(PROCINC) $(OS2INC)
  34. [prerules]
  35. RTL=..
  36. INC=$(RTL)/inc
  37. PROCINC=$(RTL)/$(CPU_TARGET)
  38. OS2INC=$(RTL)/os2
  39. UNITPREFIX=rtl
  40. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  41. SYSTEMUNIT=system
  42. else
  43. SYSTEMUNIT=sysemx
  44. endif
  45. # Use new feature from 1.0.5 version
  46. # that generates release PPU files
  47. # which will not be recompiled
  48. ifdef RELEASE
  49. override FPCOPT+=-Ur
  50. endif
  51. # Paths
  52. OBJPASDIR=$(RTL)/objpas
  53. GRAPHDIR=$(INC)/graph
  54. [rules]
  55. .NOTPARALLEL:
  56. # Get the system independent include file names.
  57. # This will set the following variables :
  58. # SYSINCNAMES
  59. include $(INC)/makefile.inc
  60. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  61. # Get the processor dependent include file names.
  62. # This will set the following variables :
  63. # CPUINCNAMES
  64. include $(PROCINC)/makefile.cpu
  65. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  66. # Put system unit dependencies together.
  67. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  68. #
  69. # Loaders
  70. #
  71. %$(OEXT) : %.as
  72. $(AS) -o $(UNITTARGETDIRPREFIX)$*$(OEXT) $*.as
  73. #
  74. # Base Units (System, strings, os-dependent-base-unit)
  75. #
  76. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pas $(SYSDEPS)
  77. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pas
  78. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  79. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  80. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  81. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  82. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  83. $(SYSTEMUNIT)$(PPUEXT)
  84. #
  85. # System Dependent Units
  86. #
  87. ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  88. doscalls$(PPUEXT) : $(OS2INC)/doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. kbdcalls$(PPUEXT) : $(OS2INC)/kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT)
  90. moucalls$(PPUEXT) : $(OS2INC)/moucalls.pas $(SYSTEMUNIT)$(PPUEXT)
  91. moncalls$(PPUEXT) : $(OS2INC)/moncalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  92. os2def$(PPUEXT) : $(OS2INC)/os2def.pas $(SYSTEMUNIT)$(PPUEXT)
  93. doscall2$(PPUEXT) : $(OS2INC)/doscall2.pas doscalls$(PPUEXT) os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. pmwin$(PPUEXT) : $(OS2INC)/pmwin.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  95. pmbitmap$(PPUEXT) : $(OS2INC)/pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT)
  96. pmgpi$(PPUEXT) : $(OS2INC)/pmgpi.pas pmbitmap$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  97. pmstddlg$(PPUEXT) : $(OS2INC)/pmstddlg.pas os2def$(PPUEXT) doscalls$(PPUEXT) pmwin$(PPUEXT) pmgpi$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  98. pmhelp$(PPUEXT) : $(OS2INC)/pmhelp.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  99. pmdev$(PPUEXT) : $(OS2INC)/pmdev.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  100. pmspl$(PPUEXT) : $(OS2INC)/pmspl.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  101. pmshl$(PPUEXT) : $(OS2INC)/pmshl.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  102. pmwp$(PPUEXT) : $(OS2INC)/pmwp.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  103. pmwsock$(PPUEXT) : $(OS2INC)/pmwsock.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  104. pmbidi$(PPUEXT) : $(OS2INC)/pmbidi.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  105. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  106. #
  107. # TP7 Compatible RTL Units
  108. #
  109. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  110. doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  111. #graph$(PPUEXT) : graph.pp
  112. #
  113. # Delphi Compatible Units
  114. #
  115. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  116. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  117. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  118. classes$(PPUEXT) : $(OS2INC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  119. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) \
  120. objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) fgl$(PPUEXT)
  121. $(COMPILER) -Fi$(OBJPASDIR)/classes $(OS2INC)/classes.pp
  122. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  123. $(COMPILER) $(OBJPASDIR)/math.pp
  124. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconst$(PPUEXT)
  125. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  126. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  127. $(COMPILER) $(OBJPASDIR)/types.pp
  128. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  129. $(COMPILER) $(OBJPASDIR)/fgl.pp
  130. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  131. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/rtlconst.pp
  132. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  134. #
  135. # Mac Pascal Model
  136. #
  137. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  138. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  139. #
  140. # Other system-independent RTL Units
  141. #
  142. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  143. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  144. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  145. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  146. $(COMPILER) -Sg $(INC)/heaptrc.pp
  147. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  148. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  149. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  150. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  151. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  152. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  153. #
  154. # Other system-dependent RTL Units