Makefile.fpc 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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 so32dll \
  10. pmbitmap pmwin pmgpi pmstddlg pmhelp pmdev pmspl pmshl pmwp pmwsock pmbidi \
  11. dos unicodedata unicodenumtable character sortbase \
  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 cp3021 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 cpkoi8_r cpkoi8_u
  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) $(FPC_SYSTEM_OPT) -Us -Sg $<
  78. uuchar$(PPUEXT): $(INC)/uuchar.pp $(SYSTEMUNIT)$(PPUEXT)
  79. $(COMPILER) $<
  80. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  81. $(COMPILER) -Fi$(OBJPASDIR) $<
  82. iso7185$(PPUEXT): $(INC)/iso7185.pp $(SYSTEMUNIT)$(PPUEXT)
  83. $(COMPILER) $<
  84. extpas$(PPUEXT): $(INC)/extpas.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  85. $(COMPILER) $<
  86. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
  87. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
  88. $(SYSTEMUNIT)$(PPUEXT)
  89. $(COMPILER) -Fi$(INC) $<
  90. #
  91. # System Dependent Units
  92. #
  93. ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. $(COMPILER) $<
  95. doscalls$(PPUEXT) : $(OS2INC)/doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  96. $(COMPILER) $<
  97. viocalls$(PPUEXT) : $(OS2INC)/viocalls.pas $(SYSTEMUNIT)$(PPUEXT)
  98. $(COMPILER) $<
  99. so32dll$(PPUEXT) : $(OS2INC)/so32dll.pas $(SYSTEMUNIT)$(PPUEXT)
  100. $(COMPILER) $<
  101. kbdcalls$(PPUEXT) : $(OS2INC)/kbdcalls.pas $(SYSTEMUNIT)$(PPUEXT)
  102. $(COMPILER) $<
  103. moucalls$(PPUEXT) : $(OS2INC)/moucalls.pas $(SYSTEMUNIT)$(PPUEXT)
  104. $(COMPILER) $<
  105. moncalls$(PPUEXT) : $(OS2INC)/moncalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  106. $(COMPILER) $<
  107. os2def$(PPUEXT) : $(OS2INC)/os2def.pas $(SYSTEMUNIT)$(PPUEXT)
  108. $(COMPILER) $<
  109. doscall2$(PPUEXT) : $(OS2INC)/doscall2.pas doscalls$(PPUEXT) os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  110. $(COMPILER) $<
  111. pmwin$(PPUEXT) : $(OS2INC)/pmwin.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  112. $(COMPILER) $<
  113. pmbitmap$(PPUEXT) : $(OS2INC)/pmbitmap.pas $(SYSTEMUNIT)$(PPUEXT)
  114. $(COMPILER) $<
  115. pmgpi$(PPUEXT) : $(OS2INC)/pmgpi.pas pmbitmap$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  116. $(COMPILER) $<
  117. pmstddlg$(PPUEXT) : $(OS2INC)/pmstddlg.pas os2def$(PPUEXT) doscalls$(PPUEXT) pmwin$(PPUEXT) pmgpi$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  118. $(COMPILER) $<
  119. pmhelp$(PPUEXT) : $(OS2INC)/pmhelp.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. $(COMPILER) $<
  121. pmdev$(PPUEXT) : $(OS2INC)/pmdev.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  122. $(COMPILER) $<
  123. pmspl$(PPUEXT) : $(OS2INC)/pmspl.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  124. $(COMPILER) $<
  125. pmshl$(PPUEXT) : $(OS2INC)/pmshl.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  126. $(COMPILER) $<
  127. pmwp$(PPUEXT) : $(OS2INC)/pmwp.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  128. $(COMPILER) $<
  129. pmwsock$(PPUEXT) : $(OS2INC)/pmwsock.pas os2def$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  130. $(COMPILER) $<
  131. pmbidi$(PPUEXT) : $(OS2INC)/pmbidi.pas os2def$(PPUEXT) pmwin$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  132. $(COMPILER) $<
  133. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  134. $(COMPILER) -Fi$(INC) $<
  135. #
  136. # TP7 Compatible RTL Units
  137. #
  138. dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  139. doscalls$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  140. $(COMPILER) -Fi$(INC) $<
  141. #graph$(PPUEXT) : graph.pp
  142. #
  143. # Delphi Compatible Units
  144. #
  145. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  146. objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  147. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $<
  148. classes$(PPUEXT) : $(OS2INC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  149. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) types$(PPUEXT) \
  150. objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) fgl$(PPUEXT) sortbase$(PPUEXT)
  151. $(COMPILER) -Fi$(OBJPASDIR)/classes $<
  152. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  153. $(COMPILER) $<
  154. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT) rtlconst$(PPUEXT)
  155. $(COMPILER) -Sg $<
  156. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  157. $(COMPILER) $<
  158. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT) sortbase$(PPUEXT)
  159. $(COMPILER) $<
  160. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  161. $(COMPILER) -Fi$(OBJPASDIR) $<
  162. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  163. $(COMPILER) $<
  164. #
  165. # Mac Pascal Model
  166. #
  167. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  168. $(COMPILER) $<
  169. #
  170. # Other system-independent RTL Units
  171. #
  172. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  173. $(COMPILER) $<
  174. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  175. $(COMPILER) $<
  176. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  177. $(COMPILER) $<
  178. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  179. $(COMPILER) -Sg $<
  180. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  181. $(COMPILER) $<
  182. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  183. $(COMPILER) $<
  184. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  185. $(COMPILER) $<
  186. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  187. $(COMPILER) -Fi$(RTL)/charmaps $<
  188. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  189. $(COMPILER) $<
  190. unicodenumtable$(PPUEXT): $(OBJPASDIR)/unicodenumtable.pas $(SYSTEMUNIT)$(PPUEXT)
  191. $(COMPILER) $<
  192. unicodedata$(PPUEXT): $(OBJPASDIR)/unicodedata.pas unicodenumtable$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  193. $(COMPILER) $<
  194. character$(PPUEXT): $(OBJPASDIR)/character.pas unicodedata$(PPUEXT) sysutils$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  195. $(COMPILER) $<
  196. sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  197. $(COMPILER) $<