Makefile.fpc 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 extpas strings \
  9. lineinfo lnfodwrf heaptrc \
  10. dos sysconst \
  11. initc sysutils types typinfo fgl classes \
  12. cpu mmx getopts \
  13. charset cpall \
  14. character fpwidestring unicodedata unicodenumtable \
  15. rtlconsts math \
  16. cmem dynlibs \
  17. aio nwsnut nwserv nwnit nwprot netware nwcalls ctypes nwpre \
  18. softfpu sfpux80 ufloatx80 sfpu128 ufloat128
  19. rsts=math typinfo classes sysconst rtlconsts
  20. implicitunits=exeinfo \
  21. cp1250 cp1251 cp1252 cp1253 cp1254 cp1255 cp1256 cp1257 cp1258 \
  22. cp437 cp646 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
  23. cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
  24. cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
  25. cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u
  26. [require]
  27. nortl=y
  28. [install]
  29. fpcpackage=y
  30. [default]
  31. fpcdir=../..
  32. target=netware
  33. cpu=i386
  34. [compiler]
  35. includedir=$(INC) $(PROCINC)
  36. sourcedir=$(INC) $(PROCINC) $(COMMON)
  37. [prerules]
  38. RTL=..
  39. INC=$(RTL)/inc
  40. COMMON=$(RTL)/common
  41. PROCINC=$(RTL)/$(CPU_TARGET)
  42. UNITPREFIX=rtl
  43. SYSTEMUNIT=system
  44. # Use new feature from 1.0.5 version
  45. # that generates release PPU files
  46. # which will not be recompiled
  47. # ifdef RELEASE
  48. override FPCOPT+=-Ur
  49. # endif
  50. #debug, -a: dont delete asm, -al include lines
  51. #override FPCOPT+=-a
  52. #override FPCOPT+=-al
  53. # for netware always use multithread
  54. override FPCOPT+=-dMT
  55. # and alway use smartlinking
  56. CREATESMART=1
  57. # Paths
  58. OBJPASDIR=$(RTL)/objpas
  59. # Imp-Files
  60. IMPFILES=aio.imp audnlm32.imp \
  61. calnlm32.imp ccs.imp ccs-os.imp clibaux.imp \
  62. clibctx.imp clib.imp clxnlm32.imp dplsv386.imp \
  63. dsapi.imp dsevent.imp lib0.imp \
  64. locnlm32.imp ndpsrpc.imp netnlm32.imp nit.imp \
  65. nlmlib.imp nwpsrv3x.imp nwpsrv.imp nwsnut.imp \
  66. requestr.imp socklib.imp streams.imp threads.imp \
  67. tli.imp vollib.imp ws2_32.imp ws2nlm.imp unicode.imp \
  68. nwpre.imp
  69. [rules]
  70. .NOTPARALLEL:
  71. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  72. # Get the system independent include file names.
  73. # This will set the following variables :
  74. # SYSINCNAMES
  75. include $(INC)/makefile.inc
  76. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  77. # Get the processor dependent include file names.
  78. # This will set the following variables :
  79. # CPUINCNAMES
  80. include $(PROCINC)/makefile.cpu
  81. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  82. # Put system unit dependencies together.
  83. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  84. copyimpfiles:
  85. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  86. #
  87. # Loaders
  88. #
  89. #nwpre$(OEXT) : nwpre.as
  90. # $(AS) -o $(UNITTARGETDIRPREFIX)nwpre$(OEXT) nwpre.as
  91. #prelude$(OEXT) : prelude.as
  92. # $(AS) -o $(UNITTARGETDIRPREFIX)prelude$(OEXT) prelude.as
  93. #
  94. # System Units (System, Objpas, Strings)
  95. #
  96. # always copy the imp files to the ppu dir, does not work
  97. # with system.pp copyimpfile nwsys.inc ...
  98. # because this will always build system.ppu
  99. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp nwsys.inc $(SYSDEPS)
  100. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  101. $(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(SYSTEMUNIT).pp
  102. uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp
  103. objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
  104. $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp
  105. strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
  106. $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
  107. $(SYSTEMUNIT)$(PPUEXT)
  108. #
  109. # System Dependent Units
  110. #
  111. nwpre$(PPUEXT) : nwpre.pp $(SYSTEMUNIT)$(PPUEXT)
  112. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  113. #dynlibs$(PPUEXT) : $(INC)/dynlibs.pas windows$(PPUEXT)
  114. initc$(PPUEXT) : initc.pp ctypes$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  115. #
  116. # TP7 Compatible RTL Units
  117. #
  118. dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  119. #
  120. # Delphi Compatible Units
  121. #
  122. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  123. objpas$(PPUEXT) dos$(PPUEXT) nwsys.inc sysconst$(PPUEXT)
  124. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  125. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  126. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) \
  127. sysconst$(PPUEXT) types$(PPUEXT) fgl$(PPUEXT)
  128. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  129. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT)
  130. $(COMPILER) $(OBJPASDIR)/fgl.pp
  131. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  132. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  133. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  134. $(COMPILER) $(OBJPASDIR)/math.pp
  135. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  136. $(COMPILER) $(OBJPASDIR)/types.pp
  137. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp
  138. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  139. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  140. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  141. #
  142. # Mac Pascal Model
  143. #
  144. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  145. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  146. #
  147. # Other system-independent RTL Units
  148. #
  149. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  150. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  151. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  152. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  153. $(COMPILER) -Sg $(INC)/heaptrc.pp
  154. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  155. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  156. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  157. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  158. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  159. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  160. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  161. fpwidestring$(PPUEXT): $(OBJPASDIR)/fpwidestring.pp charset$(PPUEXT) system$(PPUEXT)
  162. $(COMPILER) $(OBJPASDIR)/fpwidestring.pp
  163. character$(PPUEXT): $(OBJPASDIR)/character.pas sysutils$(PPUEXT) objpas$(PPUEXT) rtlconsts$(PPUEXT) unicodedata$(PPUEXT) system$(PPUEXT)
  164. $(COMPILER) $(OBJPASDIR)/character.pas
  165. unicodenumtable$(PPUEXT) : $(OBJPASDIR)/unicodenumtable.pas system$(PPUEXT)
  166. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodenumtable.pas
  167. unicodedata$(PPUEXT) : $(OBJPASDIR)/unicodedata.pas unicodenumtable$(PPUEXT) system$(PPUEXT)
  168. $(COMPILER) -Fi$(OBJPASDIR) $(OBJPASDIR)/unicodedata.pas
  169. softfpu$(PPUEXT) : $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  170. $(COMPILER) $<
  171. sfpux80$(PPUEXT) : $(INC)/sfpux80.pp $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  172. $(COMPILER) $<
  173. sfpu128$(PPUEXT) : $(INC)/sfpu128.pp $(INC)/softfpu.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT)
  174. $(COMPILER) $<
  175. ufloatx80$(PPUEXT) : $(INC)/ufloatx80.pp sfpux80$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  176. $(COMPILER) $<
  177. ufloat128$(PPUEXT) : $(INC)/ufloat128.pp sfpu128$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  178. $(COMPILER) $<
  179. #
  180. # Other system-dependent RTL Units
  181. #
  182. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  183. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  184. nwsnut$(PPUEXT) : nwsnut.pp nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  185. nwserv$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  186. nwcalls$(PPUEXT) : $(SYSTEMUNIT)$(PPUEXT)
  187. #
  188. # Netware-.imp files need to be installed in the unit-dir
  189. #
  190. override INSTALLPPUFILES+=$(IMPFILES)
  191. override CLEANPPUFILES+=$(addprefix $(COMPILER_UNITTARGETDIR)/,$(IMPFILES))