Makefile.fpc 8.0 KB

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