Makefile.fpc 5.2 KB

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