Makefile.fpc 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 extpas strings \
  9. lineinfo lnfodwrf heaptrc \
  10. nwsnut libc dos sysconst \
  11. initc sysutils types typinfo sortbase 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 cp737 cp775 cp850 cp852 cp855 cp856 cp857 cp860 cp861 cp862 \
  20. cp863 cp864 cp865 cp866 cp869 cp874 cp3021 cp8859_1 cp8859_2 cp8859_3 cp8859_4 \
  21. cp8859_5 cp8859_6 cp8859_7 cp8859_8 cp8859_9 cp8859_10 cp8859_11 \
  22. cp8859_13 cp8859_14 cp8859_15 cp8859_16 cpkoi8_r cpkoi8_u
  23. [require]
  24. nortl=y
  25. [install]
  26. fpcpackage=y
  27. [default]
  28. fpcdir=../..
  29. target=netwlibc
  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. IMPFILES=nwsnut.imp ws2_32.imp ws2nlm.imp libc.imp netware.imp \
  40. libcclib.imp
  41. # nwplibc.o
  42. SYSTEMUNIT=system
  43. # Use new feature from 1.0.5 version
  44. # that generates release PPU files
  45. # which will not be recompiled
  46. # ifdef RELEASE
  47. override FPCOPT+=-Ur
  48. # endif
  49. #debug, -a: dont delete asm, -al include lines
  50. #override FPCOPT+=-a
  51. #override FPCOPT+=-al
  52. # for netware always use multithread
  53. override FPCOPT+=-dMT
  54. # and alway use smartlinking
  55. CREATESMART=1
  56. # Paths
  57. OBJPASDIR=$(RTL)/objpas
  58. # binutils are the same for targets netware and netwlibc
  59. override BINUTILSPREFIX=$(CPU_TARGET)-netware-
  60. [rules]
  61. .NOTPARALLEL:
  62. SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
  63. # Get the system independent include file names.
  64. # This will set the following variables :
  65. # SYSINCNAMES
  66. include $(INC)/makefile.inc
  67. SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
  68. # Get the processor dependent include file names.
  69. # This will set the following variables :
  70. # CPUINCNAMES
  71. include $(PROCINC)/makefile.cpu
  72. SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
  73. # Put system unit dependencies together.
  74. SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
  75. copyimpfiles:
  76. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  77. #
  78. # Loaders
  79. #
  80. #nwpre$(OEXT) : nwpre.as
  81. # $(AS) -o nwpre$(OEXT) nwpre.as
  82. #prelude$(OEXT) : prelude.as
  83. # $(AS) -o prelude$(OEXT) prelude.as
  84. # for now use the gcc pre
  85. nwplibc$(OEXT) :
  86. cp pre/libcpre.gcc.o $(UNITTARGETDIRPREFIX)nwplibc$(OEXT)
  87. nwl_main$(OEXT) : nwl_main.as
  88. $(AS) -o $(UNITTARGETDIRPREFIX)nwl_main$(OEXT) nwl_main.as
  89. nwl_dlle$(OEXT) : nwl_dlle.as
  90. $(AS) -o $(UNITTARGETDIRPREFIX)nwl_dlle$(OEXT) nwl_dlle.as
  91. #
  92. # System Units (System, Objpas, Strings)
  93. #
  94. $(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp libc.pp $(SYSDEPS)
  95. $(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
  96. $(COMPILER) $(FPC_SYSTEM_OPT) -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. netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
  107. $(COMPILER) -I$(WININC) netware.pp
  108. nwsnut$(PPUEXT) : nwsnut.pp ../netware/nwsnut.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  109. dynlibs$(PPUEXT) : $(INC)/dynlibs.pas libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  110. initc$(PPUEXT) : initc.pp ctypes$(PPUEXT) libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  111. #
  112. # TP7 Compatible RTL Units
  113. #
  114. dos$(PPUEXT) : dos.pp libc.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  115. #
  116. # Delphi Compatible Units
  117. #
  118. sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
  119. objpas$(PPUEXT) dos$(PPUEXT) libc.pp sysconst$(PPUEXT)
  120. $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
  121. classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
  122. sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) \
  123. sysconst$(PPUEXT) types$(PPUEXT) sortbase$(PPUEXT) \
  124. tthread.inc fgl$(PPUEXT)
  125. $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
  126. fgl$(PPUEXT) : $(OBJPASDIR)/fgl.pp objpas$(PPUEXT) types$(PPUEXT) system$(PPUEXT) sysutils$(PPUEXT) sortbase$(PPUEXT)
  127. $(COMPILER) $(OBJPASDIR)/fgl.pp
  128. typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
  129. $(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
  130. math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
  131. $(COMPILER) $(OBJPASDIR)/math.pp
  132. types$(PPUEXT) : $(OBJPASDIR)/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  133. $(COMPILER) $(OBJPASDIR)/types.pp
  134. rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  135. $(COMPILER) $(OBJPASDIR)/rtlconsts.pp
  136. sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  137. $(COMPILER) $(OBJPASDIR)/sysconst.pp
  138. #
  139. # Mac Pascal Model
  140. #
  141. macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
  142. $(COMPILER) $(INC)/macpas.pp $(REDIR)
  143. #
  144. # Other system-independent RTL Units
  145. #
  146. cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
  147. mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  148. getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
  149. heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
  150. $(COMPILER) -Sg $(INC)/heaptrc.pp
  151. lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
  152. lnfodwrf$(PPUEXT) : $(INC)/lnfodwrf.pp $(SYSTEMUNIT)$(PPUEXT)
  153. charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
  154. cpall$(PPUEXT): $(RTL)/charmaps/cpall.pas system$(PPUEXT) charset$(PPUEXT)
  155. $(COMPILER) -Fu$(INC) -Fi$(RTL)/charmaps $(RTL)/charmaps/cpall.pas
  156. cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT)
  157. ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
  158. sortbase$(PPUEXT) : $(INC)/sortbase.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
  159. $(COMPILER) $<
  160. #
  161. # Other system-dependent RTL Units
  162. #
  163. callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
  164. aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
  165. #
  166. # Netware-.imp files need to be installed in the unit-dir
  167. #
  168. override INSTALLPPUFILES+=$(IMPFILES)
  169. override CLEANPPUFILES+=$(addprefix $(COMPILER_UNITTARGETDIR)/,$(IMPFILES))