Makefile.fpc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 os_types 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. os_types$(PPUEXT) : $(INC)/os_types.pp
  86. winsock2$(PPUEXT) : winsock2.pp qos.inc netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) os_types$(PPUEXT)
  87. sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \
  88. $(INC)/sockets.inc $(INC)/socketsh.inc
  89. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pp windows$(PPUEXT)
  90. #
  91. # TP7 Compatible RTL Units
  92. #
  93. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  94. crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT)
  95. objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMUNIT)$(PPUEXT)
  96. #
  97. # Delphi Compatible Units
  98. #
  99. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
  100. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc
  101. $(COMPILER) -I$(OBJPASDIR) sysutils.pp
  102. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  103. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  104. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  105. $(COMPILER) $(OBJPASDIR)/math.pp
  106. gettext$(PPUEXT): $(OBJPASDIR)/gettext.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  107. $(COMPILER) $(OBJPASDIR)/gettext.pp
  108. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  109. $(OBJPASDIR)/varutilh.inc varutils.pp
  110. $(COMPILER) -I$(OBJPASDIR) $(UNIXINC)/varutils.pp
  111. types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  112. $(COMPILER) $(OBJPASDIR)/types.pp
  113. #
  114. # Other system-independent RTL Units
  115. #
  116. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  117. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  118. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  119. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  120. $(COMPILER) -Sg $(INC)/heaptrc.pp
  121. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  122. #
  123. # Other system-dependent RTL Units
  124. #
  125. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  126. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  127. varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
  128. $(OBJPASDIR)/varutilh.inc varutils.pp
  129. $(COMPILER) -I$(OBJPASDIR) varutils.pp
  130. #
  131. # Netware-.imp files need to be installed in the unit-dir
  132. #
  133. override INSTALLPPUFILES+=nwimp/aio.imp nwimp/aio.imp nwimp/audnlm32.imp \
  134. nwimp/calnlm32.imp nwimp/ccs.imp nwimp/ccs-os.imp nwimp/clibaux.imp \
  135. nwimp/clibctx.imp nwimp/clib.imp nwimp/clxnlm32.imp nwimp/dplsv386.imp \
  136. nwimp/dsapi.imp nwimp/dsevent.imp nwimp/fpsm.imp nwimp/lib0.imp \
  137. nwimp/locnlm32.imp nwimp/ndpsrpc.imp nwimp/netnlm32.imp nwimp/nit.imp \
  138. nwimp/nlmlib.imp nwimp/nwpsrv3x.imp nwimp/nwpsrv.imp nwimp/nwsnut.imp \
  139. nwimp/requestr.imp nwimp/socklib.imp nwimp/streams.imp nwimp/threads.imp \
  140. nwimp/tli.imp nwimp/vollib.imp nwimp/ws2_32.imp nwimp/ws2nlm.imp
  141. # the smartlinked objects will not be installed by the
  142. # standard makefile ????
  143. #override UNITPPUFILES+=cpu.a crt.a dos.a getopts.a heaptrc.a keyboard.a \
  144. #lineinfo.a math.a mmx.a mouse.a netware.a objects.a objpas.a sockets.a \
  145. #strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a