2
0

Makefile.fpc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. #
  2. # Makefile.fpc for Free Pascal Netware RTL (Libc)
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=nwplibc
  8. units=$(SYSTEMUNIT) objpas macpas strings \
  9. lineinfo winsock heaptrc matrix \
  10. nwsnut libc dos crt objects sysconst dynlibs \
  11. initc sysutils types typinfo systhrds classes \
  12. cpu mmx getopts \
  13. dateutils strutils convutils \
  14. charset ucomplex variants \
  15. rtlconst math varutils utf8bidi \
  16. mouse
  17. rsts=math varutils variants convutils typinfo systhrds classes dateutils sysconst rtlconst
  18. [require]
  19. nortl=y
  20. [install]
  21. fpcpackage=y
  22. [default]
  23. fpcdir=../..
  24. target=netwlibc
  25. [compiler]
  26. includedir=$(INC) $(PROCINC)
  27. sourcedir=$(INC) $(PROCINC)
  28. targetdir=.
  29. [prerules]
  30. RTL=..
  31. INC=$(RTL)/inc
  32. PROCINC=$(RTL)/$(CPU_TARGET)
  33. UNITPREFIX=rtl
  34. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  35. SYSTEMUNIT=system
  36. else
  37. SYSTEMUNIT=sysnetwa
  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. #debug, -a: dont delete asm, -al include lines
  46. #override FPCOPT+=-a
  47. #override FPCOPT+=-al
  48. # for netware always use multithread
  49. override FPCOPT+=-dMT -dDEBUG_MT
  50. # and alway use smartlinking
  51. #CREATESMART=1
  52. CREATESMART=0
  53. # Paths
  54. OBJPASDIR=$(RTL)/objpas
  55. [rules]
  56. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  57. # Get the system independent include file names.
  58. # This will set the following variables :
  59. # SYSINCNAMES
  60. include $(INC)/makefile.inc
  61. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  62. # Get the processor dependent include file names.
  63. # This will set the following variables :
  64. # CPUINCNAMES
  65. include $(PROCINC)/makefile.cpu
  66. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  67. # Put system unit dependencies together.
  68. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  69. #
  70. # Loaders
  71. #
  72. #nwpre$(OEXT) : nwpre.as
  73. # $(AS) -o nwpre$(OEXT) nwpre.as
  74. #prelude$(OEXT) : prelude.as
  75. # $(AS) -o prelude$(OEXT) prelude.as
  76. # for now use the gcc pre
  77. nwplibc$(OEXT) :
  78. cp pre/libcpre.gcc.o nwplibc.o
  79. #
  80. # System Units (System, Objpas, Strings)
  81. #
  82. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp libc.pp $(SYSDEPS)
  83. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
  84. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  85. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  86. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  87. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  88. $(SYSTEMUNIT)$(PPUEXT)
  89. systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  90. #
  91. # System Dependent Units
  92. #
  93. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  94. $(COMPILER) -I$(WININC) netware.pp
  95. winsock2$(PPUEXT) : winsock2.pp qos.inc netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  96. sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  97. $(INC)/sockets.inc $(INC)/socketsh.inc
  98. dynlibs$(PPUEXT) : $(INC)/dynlibs.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  99. initc$(PPUEXT) : initc.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  100. #
  101. # TP7 Compatible RTL Units
  102. #
  103. dos$(PPUEXT) : dos.pp libc.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  104. crt$(PPUEXT) : crt.pp libc.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT)
  105. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  106. #
  107. # Delphi Compatible Units
  108. #
  109. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  110. objpas$(PPUEXT) dos$(PPUEXT) libc.pp sysconst$(PPUEXT)
  111. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  112. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  113. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) \
  114. sysconst$(PPUEXT) types$(PPUEXT) systhrds$(PPUEXT)
  115. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  116. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  117. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  118. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  119. $(COMPILER) $(OBJPASDIR)/math.pp
  120. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  121. $(COMPILER) $(OBJPASDIR)/gettext.pp
  122. varutils$(PPUEXT) : varutils.pp $(OBJPASDIR)/cvarutil.inc \
  123. objpas$(PPUEXT) $(OBJPASDIR)/varutilh.inc
  124. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  125. utf8bidi$(PPUEXT) : $(OBJPASDIR)/utf8bidi.pp
  126. $(COMPILER) $(OBJPASDIR)/utf8bidi.pp
  127. variants$(PPUEXT) : $(INC)/variants.pp varutils$(PPUEXT)
  128. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  129. $(COMPILER) $(OBJPASDIR)/types.pp
  130. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  131. $(COMPILER) $(OBJPASDIR)/rtlconst.pp
  132. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  134. dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
  135. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  136. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp
  137. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutils.pp
  138. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
  139. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/strutils.pp
  140. #
  141. # Mac Pascal Model
  142. #
  143. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  144. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  145. #
  146. # Other system-independent RTL Units
  147. #
  148. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  149. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  150. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  151. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  152. $(COMPILER) -Sg $(INC)/heaptrc.pp
  153. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  154. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  155. ucomplex$(PPUEXT) : $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  156. #
  157. # Other system-dependent RTL Units
  158. #
  159. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  160. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  161. #
  162. # Netware-.imp files need to be installed in the unit-dir
  163. #
  164. override INSTALLPPUFILES+=nwsnut.imp ws2_32.imp ws2nlm.imp libc.imp netware.imp \
  165. libcclib.imp nwplibc.o