Makefile.fpc 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. #
  2. # Makefile.fpc for Free Pascal Netware RTL
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=nwpre prelude
  8. units=$(SYSTEMUNIT) systhrds objpas macpas strings \
  9. lineinfo winsock heaptrc matrix initc \
  10. dos crt objects \
  11. sysutils classes typinfo math varutils \
  12. cpu mmx getopts \
  13. sockets \
  14. video mouse keyboard types dateutils rtlconst sysconst \
  15. strutils convutils \
  16. aio nwsnut nwserv nwnit nwprot
  17. rsts=math varutils typinfo classes dateutils sysconst convutils rtlconst systhrds
  18. [require]
  19. nortl=y
  20. [install]
  21. fpcpackage=y
  22. [default]
  23. fpcdir=../..
  24. target=netware
  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
  50. # and alway use smartlinking
  51. CREATESMART=1
  52. # Paths
  53. OBJPASDIR=$(RTL)/objpas
  54. [rules]
  55. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  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. nwpre$(OEXT) : nwpre.as
  72. $(AS) -o nwpre$(OEXT) nwpre.as
  73. prelude$(OEXT) : prelude.as
  74. $(AS) -o prelude$(OEXT) prelude.as
  75. #
  76. # System Units (System, Objpas, Strings)
  77. #
  78. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
  79. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
  80. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  81. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  82. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  83. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  84. $(SYSTEMUNIT)$(PPUEXT)
  85. systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  86. #
  87. # System Dependent Units
  88. #
  89. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  90. winsock$(PPUEXT) : winsock.pp $(SYSTEMUNIT)$(PPUEXT)
  91. sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  92. $(INC)/sockets.inc $(INC)/socketsh.inc
  93. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  94. initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT)
  95. #
  96. # TP7 Compatible RTL Units
  97. #
  98. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  99. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT)
  100. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  101. #
  102. # Delphi Compatible Units
  103. #
  104. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  105. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc sysconst$(PPUEXT)
  106. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  107. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  108. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) \
  109. sysconst$(PPUEXT) types$(PPUEXT) systhrds$(PPUEXT)
  110. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  111. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  112. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  113. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  114. $(COMPILER) $(OBJPASDIR)/math.pp
  115. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  116. $(COMPILER) $(OBJPASDIR)/gettext.pp
  117. varutils$(PPUEXT) : varutils.pp $(OBJPASDIR)/cvarutil.inc \
  118. objpas$(PPUEXT) $(OBJPASDIR)/varutilh.inc
  119. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  120. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  121. $(COMPILER) $(OBJPASDIR)/types.pp
  122. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp
  123. $(COMPILER) $(OBJPASDIR)/rtlconst.pp
  124. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  125. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  126. dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
  127. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  128. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp
  129. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutils.pp
  130. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
  131. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/strutils.pp
  132. #
  133. # Mac Pascal Model
  134. #
  135. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  136. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  137. #
  138. # Other system-independent RTL Units
  139. #
  140. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  141. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  142. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  143. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  144. $(COMPILER) -Sg $(INC)/heaptrc.pp
  145. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  146. #
  147. # Other system-dependent RTL Units
  148. #
  149. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  150. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  151. #
  152. # Netware-.imp files need to be installed in the unit-dir
  153. #
  154. override INSTALLPPUFILES+=aio.imp audnlm32.imp \
  155. calnlm32.imp ccs.imp ccs-os.imp clibaux.imp \
  156. clibctx.imp clib.imp clxnlm32.imp dplsv386.imp \
  157. dsapi.imp dsevent.imp lib0.imp \
  158. locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
  159. nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
  160. requestr.imp socklib.imp streams.imp threads.imp \
  161. tli.imp vollib.imp ws2_32.imp ws2nlm.imp
  162. # the smartlinked objects will not be installed by the
  163. # standard makefile ????
  164. #override UNITPPUFILES+=cpu.a crt.a dos.a getopts.a heaptrc.a keyboard.a \
  165. #lineinfo.a math.a mmx.a mouse.a netware.a objects.a objpas.a sockets.a \
  166. #strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a