Makefile.fpc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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 strings \
  9. netware winsock2 \
  10. dos crt objects \
  11. sysutils typinfo math \
  12. cpu mmx getopts heaptrc lineinfo \
  13. sockets aio varutils \
  14. video mouse keyboard types \
  15. nwsnut nwserv nwnit nwprot
  16. rsts=math typinfo varutils
  17. [require]
  18. nortl=y
  19. [install]
  20. fpcpackage=y
  21. [default]
  22. fpcdir=../..
  23. target=netware
  24. [compiler]
  25. includedir=$(INC) $(PROCINC)
  26. sourcedir=$(INC) $(PROCINC)
  27. targetdir=.
  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. #override FPCOPT+=-a
  45. #override FPCOPT+=-al
  46. # for netware always use multithread
  47. override FPCOPT+=-dMT
  48. # and alway use smartlinking
  49. CREATESMART=1
  50. # Paths
  51. OBJPASDIR=$(RTL)/objpas
  52. [rules]
  53. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  54. # Get the system independent include file names.
  55. # This will set the following variables :
  56. # SYSINCNAMES
  57. include $(INC)/makefile.inc
  58. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  59. # Get the processor dependent include file names.
  60. # This will set the following variables :
  61. # CPUINCNAMES
  62. include $(PROCINC)/makefile.cpu
  63. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  64. # Put system unit dependencies together.
  65. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  66. #
  67. # Loaders
  68. #
  69. nwpre$(OEXT) : nwpre.as
  70. $(AS) -o nwpre$(OEXT) nwpre.as
  71. prelude$(OEXT) : prelude.as
  72. $(AS) -o prelude$(OEXT) prelude.as
  73. #
  74. # System Units (System, Objpas, Strings)
  75. #
  76. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
  77. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
  78. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  79. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  80. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  81. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  82. $(SYSTEMUNIT)$(PPUEXT)
  83. #
  84. # System Dependent Units
  85. #
  86. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  87. $(COMPILER) -I$(WININC) netware.pp
  88. winsock2$(PPUEXT) : winsock2.pp qos.inc netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  89. sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  90. $(INC)/sockets.inc $(INC)/socketsh.inc
  91. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  92. #
  93. # TP7 Compatible RTL Units
  94. #
  95. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  96. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT)
  97. objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT)
  98. #
  99. # Delphi Compatible Units
  100. #
  101. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  102. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc
  103. $(COMPILER) -I$(OBJPASDIR) sysutils.pp
  104. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  105. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  106. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  107. $(COMPILER) $(OBJPASDIR)/math.pp
  108. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  109. $(COMPILER) $(OBJPASDIR)/gettext.pp
  110. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  111. $(OBJPASDIR)/varutilh.inc varutils.pp
  112. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  113. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. $(COMPILER) $(OBJPASDIR)/types.pp
  115. #
  116. # Other system-independent RTL Units
  117. #
  118. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  119. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  120. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  121. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  122. $(COMPILER) -Sg $(INC)/heaptrc.pp
  123. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  124. #
  125. # Other system-dependent RTL Units
  126. #
  127. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  128. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  129. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  130. $(OBJPASDIR)/varutilh.inc varutils.pp
  131. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  132. #
  133. # Netware-.imp files need to be installed in the unit-dir
  134. #
  135. override INSTALLPPUFILES+=nwimp/aio.imp nwimp/aio.imp nwimp/audnlm32.imp \
  136. nwimp/calnlm32.imp nwimp/ccs.imp nwimp/ccs-os.imp nwimp/clibaux.imp \
  137. nwimp/clibctx.imp nwimp/clib.imp nwimp/clxnlm32.imp nwimp/dplsv386.imp \
  138. nwimp/dsapi.imp nwimp/dsevent.imp nwimp/fpsm.imp nwimp/lib0.imp \
  139. nwimp/locnlm32.imp nwimp/ndpsrpc.imp nwimp/netnlm32.imp nwimp/nit.imp \
  140. nwimp/nlmlib.imp nwimp/nwpsrv3x.imp nwimp/nwpsrv.imp nwimp/nwsnut.imp \
  141. nwimp/requestr.imp nwimp/socklib.imp nwimp/streams.imp nwimp/threads.imp \
  142. nwimp/tli.imp nwimp/vollib.imp nwimp/ws2_32.imp nwimp/ws2nlm.imp
  143. # the smartlinked objects will not be installed by the
  144. # standard makefile ????
  145. #override UNITPPUFILES+=cpu.a crt.a dos.a getopts.a heaptrc.a keyboard.a \
  146. #lineinfo.a math.a mmx.a mouse.a netware.a objects.a objpas.a sockets.a \
  147. #strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a