Makefile.fpc 6.0 KB

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