Makefile.fpc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. [prerules]
  29. RTL=..
  30. INC=$(RTL)/inc
  31. PROCINC=$(RTL)/$(CPU_TARGET)
  32. UNITPREFIX=rtl
  33. ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
  34. SYSTEMUNIT=system
  35. else
  36. SYSTEMUNIT=sysnetwa
  37. endif
  38. # Use new feature from 1.0.5 version
  39. # that generates release PPU files
  40. # which will not be recompiled
  41. # ifdef RELEASE
  42. override FPCOPT+=-Ur
  43. # endif
  44. #debug, -a: dont delete asm, -al include lines
  45. #override FPCOPT+=-a
  46. #override FPCOPT+=-al
  47. # for netware always use multithread
  48. override FPCOPT+=-dMT
  49. # and alway use smartlinking
  50. CREATESMART=1
  51. # Paths
  52. OBJPASDIR=$(RTL)/objpas
  53. [rules]
  54. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  55. # Get the system independent include file names.
  56. # This will set the following variables :
  57. # SYSINCNAMES
  58. include $(INC)/makefile.inc
  59. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  60. # Get the processor dependent include file names.
  61. # This will set the following variables :
  62. # CPUINCNAMES
  63. include $(PROCINC)/makefile.cpu
  64. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  65. # Put system unit dependencies together.
  66. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  67. #
  68. # Loaders
  69. #
  70. nwpre$(OEXT) : nwpre.as
  71. $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
  72. prelude$(OEXT) : prelude.as
  73. $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
  74. #
  75. # System Units (System, Objpas, Strings)
  76. #
  77. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
  78. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
  79. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  80. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  81. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  82. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  83. $(SYSTEMUNIT)$(PPUEXT)
  84. systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  85. #
  86. # System Dependent Units
  87. #
  88. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  89. winsock$(PPUEXT) : winsock.pp $(SYSTEMUNIT)$(PPUEXT)
  90. sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  91. $(INC)/sockets.inc $(INC)/socketsh.inc
  92. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  93. initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT)
  94. #
  95. # TP7 Compatible RTL Units
  96. #
  97. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  98. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT)
  99. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  100. #
  101. # Delphi Compatible Units
  102. #
  103. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  104. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc sysconst$(PPUEXT)
  105. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  106. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  107. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconst$(PPUEXT) \
  108. sysconst$(PPUEXT) types$(PPUEXT) systhrds$(PPUEXT)
  109. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  110. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  111. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  112. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  113. $(COMPILER) $(OBJPASDIR)/math.pp
  114. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  115. $(COMPILER) $(OBJPASDIR)/gettext.pp
  116. varutils$(PPUEXT) : varutils.pp $(OBJPASDIR)/cvarutil.inc \
  117. objpas$(PPUEXT) $(OBJPASDIR)/varutilh.inc
  118. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  119. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. $(COMPILER) $(OBJPASDIR)/types.pp
  121. rtlconst$(PPUEXT) : $(OBJPASDIR)/rtlconst.pp
  122. $(COMPILER) $(OBJPASDIR)/rtlconst.pp
  123. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  124. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  125. dateutils$(PPUEXT) : $(OBJPASDIR)/dateutils.pp
  126. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutils.pp
  127. convutils$(PPUEXT) : $(OBJPASDIR)/convutils.pp
  128. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/convutils.pp
  129. strutils$(PPUEXT) : $(OBJPASDIR)/strutils.pp
  130. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/strutils.pp
  131. #
  132. # Mac Pascal Model
  133. #
  134. macpas$(PPUEXT) : $(INC)/macpas.pp system$(PPUEXT)
  135. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  136. #
  137. # Other system-independent RTL Units
  138. #
  139. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  140. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  141. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  142. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  143. $(COMPILER) -Sg $(INC)/heaptrc.pp
  144. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  145. #
  146. # Other system-dependent RTL Units
  147. #
  148. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  149. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  150. #
  151. # Netware-.imp files need to be installed in the unit-dir
  152. #
  153. override INSTALLPPUFILES+=aio.imp audnlm32.imp \
  154. calnlm32.imp ccs.imp ccs-os.imp clibaux.imp \
  155. clibctx.imp clib.imp clxnlm32.imp dplsv386.imp \
  156. dsapi.imp dsevent.imp lib0.imp \
  157. locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
  158. nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
  159. requestr.imp socklib.imp streams.imp threads.imp \
  160. tli.imp vollib.imp ws2_32.imp ws2nlm.imp
  161. # the smartlinked objects will not be installed by the
  162. # standard makefile ????
  163. #override UNITPPUFILES+=cpu.a crt.a dos.a getopts.a heaptrc.a keyboard.a \
  164. #lineinfo.a math.a mmx.a mouse.a netware.a objects.a objpas.a sockets.a \
  165. #strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a