Makefile.fpc 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. #
  2. # Makefile.fpc for Free Pascal Netware RTL (clib)
  3. #
  4. [package]
  5. main=rtl
  6. [target]
  7. loaders=nwpre prelude
  8. units=$(SYSTEMUNIT) uuchar objpas macpas iso7185 strings \
  9. lineinfo lnfodwrf heaptrc \
  10. dos sysconst \
  11. initc sysutils types typinfo fgl classes \
  12. cpu mmx getopts \
  13. charset cpall \
  14. rtlconsts math \
  15. cmem dynlibs \
  16. aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre
  17. rsts=math typinfo classes sysconst rtlconsts
  18. implicitunits=exeinfo \
  19. cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  20. cp437 cp646 cp850 cp856 cp866 cp874 cp8859_1 cp8859_5 cp8859_2 cp852
  21. [require]
  22. nortl=y
  23. [install]
  24. fpcpackage=y
  25. [default]
  26. fpcdir=../..
  27. target=netware
  28. cpu=i386
  29. [compiler]
  30. includedir=$(INC) $(PROCINC)
  31. sourcedir=$(INC) $(PROCINC) $(COMMON)
  32. [prerules]
  33. RTL=..
  34. INC=$(RTL)/inc
  35. COMMON=$(RTL)/common
  36. PROCINC=$(RTL)/$(CPU_TARGET)
  37. UNITPREFIX=rtl
  38. SYSTEMUNIT=system
  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. # Imp-Files
  55. IMPFILES=aio.imp audnlm32.imp \
  56. calnlm32.imp ccs.imp ccs-os.imp clibaux.imp \
  57. clibctx.imp clib.imp clxnlm32.imp dplsv386.imp \
  58. dsapi.imp dsevent.imp lib0.imp \
  59. locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
  60. nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
  61. requestr.imp socklib.imp streams.imp threads.imp \
  62. tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp \
  63. nwpre.imp
  64. [rules]
  65. .NOTPARALLEL:
  66. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  67. # Get the system independent include file names.
  68. # This will set the following variables :
  69. # SYSINCNAMES
  70. include $(INC)/makefile.inc
  71. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  72. # Get the processor dependent include file names.
  73. # This will set the following variables :
  74. # CPUINCNAMES
  75. include $(PROCINC)/makefile.cpu
  76. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  77. # Put system unit dependencies together.
  78. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  79. copyimpfiles:
  80. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  81. #
  82. # Loaders
  83. #
  84. #nwpre$(OEXT) : nwpre.as
  85. # $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
  86. #prelude$(OEXT) : prelude.as
  87. # $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
  88. #
  89. # System Units (System, Objpas, Strings)
  90. #
  91. # always copy the imp files to the ppu dir, does not work
  92. # with system.pp copyimpfile nwsys.inc ...
  93. # because this will always build system.ppu
  94. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
  95. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  96. $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp
  97. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  98. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  99. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  100. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  101. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  102. $(SYSTEMUNIT)$(PPUEXT)
  103. #
  104. # System Dependent Units
  105. #
  106. nwpre$(PPUEXT) : nwpre.pp $(SYSTEMUNIT)$(PPUEXT)
  107. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  108. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pas windows$(PPUEXT)
  109. initc$(PPUEXT) : initc.pp ctypes$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  110. #
  111. # TP7 Compatible RTL Units
  112. #
  113. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  114. #
  115. # Delphi Compatible Units
  116. #
  117. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  118. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc sysconst$(PPUEXT)
  119. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  120. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  121. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) \
  122. sysconst$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
  123. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  124. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  125. $(COMPILER) $(OBJPASDIR)/fgl.pp
  126. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  127. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  128. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  129. $(COMPILER) $(OBJPASDIR)/math.pp
  130. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  131. $(COMPILER) $(OBJPASDIR)/types.pp
  132. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp
  133. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  134. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  135. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  136. #
  137. # Mac Pascal Model
  138. #
  139. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  140. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  141. #
  142. # Other system-independent RTL Units
  143. #
  144. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  145. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  146. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  147. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  148. $(COMPILER) -Sg $(INC)/heaptrc.pp
  149. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  150. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  151. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  152. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  153. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  154. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  155. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  156. #
  157. # Other system-dependent RTL Units
  158. #
  159. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  160. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  161. nwsnut$(PPUEXT) : nwsnut.pp nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  162. nwserv$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  163. nwcalls$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  164. #
  165. # Netware-.imp files need to be installed in the unit-dir
  166. #
  167. override INSTALLPPUFILES+=$(IMPFILES)
  168. override CLEANPPUFILES+=$(addprefix $(COMPILER_UNITTARGETDIR)/,$(IMPFILES))