Makefile.fpc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. #
  2. # Makefile.fpc for Free Pascal DragonFly RTL
  3. #
  4. [package]
  5. main=rtl
  6. [install]
  7. fpcpackage=y
  8. [target]
  9. loaders=prt0 cprt0 gprt0 dllprt0
  10. units=$(SYSTEMUNIT) $(UUCHARUNIT) unixtype ctypes $(OBJPASUNIT) $(MACPASUNIT) $(ISO7185UNIT) $(EXTPASUNIT) \
  11. $(STRINGSUNIT) $(SYSCALLUNIT) $(SYSCTL) baseunix unixutil $(CHARACTERUNIT) \
  12. unix $(RTLCONSTSUNIT) $(INITCUNIT) $(CMEMUNIT) \
  13. $(DLUNIT) $(TERMIOUNIT) \
  14. sysutils $(MATHUNIT) typinfo types $(SORTBASEUNIT) classes $(FGLUNIT) $(DYNLIBSUNIT) \
  15. $(CPU_UNITS) $(CHARSETUNIT) $(CPALLUNIT) $(GETOPTSUNIT) $(HEAPTRCUNIT) $(LNFODWRFUNIT) $(LINEINFOUNIT) \
  16. $(ERRORSUNIT) $(BSDUNIT) \
  17. $(CONSOLEUNIT) \
  18. $(SYSCONSTUNIT) $(CTHREADSUNIT) dos cwstring \
  19. $(FPINTRESUNIT) $(UNIXCPUNIT) $(FPWIDESTRINGUNIT) \
  20. $(SOFTFPUUNIT) $(SFPUX80UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(UFLOAT128UNIT)
  21. implicitunits=$(EXEINFOUNIT) $(CP_UNITS) $(UNICODEDATAUNIT)
  22. rsts=$(MATHUNIT) typinfo classes $(SYSCONSTUNIT)
  23. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. target=dragonfly
  29. [compiler]
  30. includedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(BSDPROCINC) $(OSPROCINC)
  31. sourcedir=$(INC) $(PROCINC) $(UNIXINC) $(BSDINC) $(COMMON)
  32. [lib]
  33. libname=libfprtl.so
  34. libversion=2.0.0
  35. libunits=$(SYSTEMUNIT) $(OBJPASUNIT) $(STRINGSUNIT) \
  36. unix \
  37. dos \
  38. sysutils typinfo $(MATHUNIT) \
  39. $(CPU_UNITS) $(GETOPTSUNIT) $(HEAPTRCUNIT) \
  40. $(ERRORSUNIT) $(DYNLIBSUNIT)
  41. [prerules]
  42. RTL=..
  43. INC=$(RTL)/inc
  44. COMMON=$(RTL)/common
  45. PROCINC=$(RTL)/$(CPU_TARGET)
  46. OSPROCINC=$(RTL)/dragonfly/$(CPU_TARGET)
  47. BSDINC=$(RTL)/bsd
  48. BSDPROCINC=$(BSDINC)/$(CPU_TARGET)
  49. UNIXINC=$(RTL)/unix
  50. UNITPREFIX=rtl
  51. CPU_UNITS=
  52. BSD_DEPS_OS=$(SYSCALLUNIT)$(PPUEXT)
  53. DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT)
  54. DYNLIBSINCDIR=$(UNIXINC)
  55. SYSCALL_DEPS_OS=sysnr.inc $(BSDPROCINC)/syscallh.inc
  56. SYSTEMUNIT=system
  57. loaders+=gprt0
  58. ifeq ($(ARCH),x86_64)
  59. CPU_UNITS=$(X86UNIT) $(PORTSUNIT) cpu
  60. endif
  61. # Use new feature from 1.0.5 version
  62. # that generates release PPU files
  63. # which will not be recompiled
  64. ifdef RELEASE
  65. override FPCOPT+=-Ur
  66. endif
  67. # Paths
  68. OBJPASDIR=$(RTL)/objpas
  69. [rules]
  70. .NOTPARALLEL:
  71. # Get the system independent include file names.
  72. # This will set the following variables :
  73. # SYSINCNAMES
  74. include $(INC)/makefile.inc
  75. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  76. # Get the processor dependent include file names.
  77. # This will set the following variables :
  78. # CPUINCNAMES
  79. include $(PROCINC)/makefile.cpu
  80. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  81. # Put system unit dependencies together.
  82. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  83. #
  84. # Loaders
  85. #
  86. prt0$(OEXT) : $(CPU_TARGET)/prt0.as
  87. $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/prt0.as
  88. cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
  89. $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
  90. gprt0$(OEXT) : $(CPU_TARGET)/gprt0.as
  91. $(AS) -o $(UNITTARGETDIRPREFIX)gprt0$(OEXT) $(CPU_TARGET)/gprt0.as
  92. dllprt0$(OEXT) : $(CPU_TARGET)/dllprt0.as
  93. $(AS) -o $(UNITTARGETDIRPREFIX)dllprt0$(OEXT) $(CPU_TARGET)/dllprt0.as
  94. #
  95. # System Units (System, Objpas, Strings)
  96. #
  97. $(SYSTEMUNIT)$(PPUEXT) : $(BSDINC)/$(SYSTEMUNIT).pp unxconst.inc $(SYSDEPS)
  98. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(BSDINC)/$(SYSTEMUNIT).pp
  99. #
  100. # System Dependent Units
  101. #
  102. unixtype$(PPUEXT): $(UNIXINC)/unixtype.pp $(UNIXINC)/ctypes.inc ptypes.inc $(SYSTEMUNIT)$(PPUEXT)
  103. baseunix$(PPUEXT) : errno.inc ptypes.inc $(UNIXINC)/ctypes.inc \
  104. $(CPU_TARGET)/signal.inc $(UNIXINC)/bunxh.inc \
  105. $(BSDINC)/bunxsysc.inc $(BSDPROCINC)/syscallh.inc sysnr.inc \
  106. $(BSDINC)/ostypes.inc $(BSDINC)/osmacro.inc $(UNIXINC)/gensigset.inc \
  107. $(UNIXINC)/genfuncs.inc $(SYSCTL)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  108. unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
  109. unxconst.inc $(UNIXINC)/timezone.inc \
  110. unxfunc.inc baseunix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  111. #
  112. # TP7 Compatible RTL Units
  113. #
  114. dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
  115. unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  116. #
  117. # Delphi Compatible Units
  118. #
  119. sysutils$(PPUEXT) : $(UNIXINC)/sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  120. $(OBJPASUNIT)$(PPUEXT) unix$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) $(SYSCONSTUNIT)$(PPUEXT)
  121. $(COMPILER) -Fi$(OBJPASDIR)/sysutils $(UNIXINC)/sysutils.pp
  122. classes$(PPUEXT) : $(UNIXINC)/classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  123. sysutils$(PPUEXT) typinfo$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) $(FGLUNIT)$(PPUEXT) sortbase$(PPUEXT)
  124. $(COMPILER) -Fi$(OBJPASDIR)/classes $(UNIXINC)/classes.pp
  125. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp $(OBJPASUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT)
  126. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  127. types$(PPUEXT) : $(OBJPASDIR)/types.pp $(OBJPASUNIT)$(PPUEXT) $(MATHUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  128. $(COMPILER) $(OBJPASDIR)/types.pp
  129. #
  130. # Other system-independent RTL Units
  131. #
  132. ifneq ($(findstring $(ARCH),x86_64 i386),)
  133. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT)
  134. else
  135. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  136. endif
  137. #
  138. # Other system-dependent RTL Units
  139. #
  140. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  141. cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) baseunix$(PPUEXT) unix$(PPUEXT) unixtype$(PPUEXT) ctypes$(PPUEXT) $(DYNLIBSUNIT)$(PPUEXT)