Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. #
  2. # $Id$
  3. # This file is part of the Free Pascal run time library.
  4. # Copyright (c) 1996-98 by Michael van Canneyt
  5. #
  6. # Makefile for the Free Pascal Runtime Library
  7. #
  8. # See the file COPYING.FPC, included in this distribution,
  9. # for details about the copyright.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. #####################################################################
  16. # Start of configurable section
  17. #####################################################################
  18. # Set redir to YES if you want a log file to be kept.
  19. ifndef REDIR
  20. REDIR=NO
  21. endif
  22. # Set NODEBUG to YES if you DON'T want debugging
  23. ifndef NODEBUG
  24. NODEBUG=YES
  25. endif
  26. # Optional : Specify the place of the log file.
  27. # default is 'log' in the source directory
  28. ifndef REDIRFILE
  29. REDIRFILE=
  30. endif
  31. # Optional: Error definitions file you want the compiler to use.
  32. # !! If you specify a path, specify an absolute path. !!
  33. ifndef ERRORFILE
  34. ERRORFILE=
  35. endif
  36. # Everything else has been moved to rtl/cfg/makefile.cfg
  37. #####################################################################
  38. # Include default makefile
  39. #####################################################################
  40. CFG=cfg
  41. include $(CFG)/makefile.cfg
  42. #######################################################################
  43. # Fix options
  44. #######################################################################
  45. # Check debugging.
  46. ifneq ($(NODEBUG),YES)
  47. override OPT+=-g
  48. endif
  49. # Check error definitions file.
  50. ifdef ERRORFILE
  51. override OPT+=-Fr$(ERRORFILE)
  52. endif
  53. # Check logfile.
  54. ifeq ($(REDIR),YES)
  55. ifndef inlinux
  56. override PP=redir -eo $(PP)
  57. endif
  58. # set the verbosity to max
  59. override OPT+=-va
  60. ifdef REDIRFILE
  61. override REDIR:= >> $(REDIRFILE)
  62. else
  63. override REDIR:= >> log
  64. endif
  65. else
  66. override REDIR:= >> con
  67. endif
  68. # Variables to export
  69. export PP OPT REDIR REDIRFILE ERRORFILE
  70. ############################################################################
  71. # Defaults
  72. ############################################################################
  73. .PHONY: rtl_go32v1 rtl_go32v2 rtl_linux rtl_os2 rtl_win32 \
  74. install_go32v1 install_go32v2 install_linux install_os2 install_win32 \
  75. go32v1libs go32v2libs linuxlibs os2libs win32libs \
  76. clean install native diffs diffclean \
  77. libs libinstall \
  78. utils utils_install
  79. all: rtls
  80. clean:
  81. make -C template clean
  82. make -C go32v1 clean
  83. make -C go32v2 clean
  84. make -C linux clean
  85. make -C win32 clean
  86. make -C os2 clean
  87. make -C utils clean
  88. -$(DEL) *.dif
  89. ############################################################################
  90. # RTLs
  91. ############################################################################
  92. native: rtl$(OS_SOURCE)
  93. rtls: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32
  94. rtlgo32v1:
  95. make -C go32v1
  96. rtlgo32v2:
  97. make -C go32v2
  98. rtllinux:
  99. make -C linux
  100. rtlos2:
  101. make -C os2
  102. rtlwin32:
  103. make -C win32
  104. rtlamiga:
  105. make -C amiga
  106. ############################################################################
  107. # Libs
  108. ############################################################################
  109. nativelibs : $(OS_SOURCE)libs
  110. libs: go32v1libs go32v2libs linuxlibs os2libs win32libs
  111. go32v1libs:
  112. make -C go32v1 libs
  113. go32v2libs:
  114. make -C go32v2 libs
  115. linuxlibs:
  116. make -C linux libs
  117. os2libs:
  118. make -C os2 libs
  119. win32libs:
  120. make -C win32 libs
  121. ############################################################################
  122. # Install
  123. ############################################################################
  124. install: install_linux install_go32v1 install_go32v2 install_os2 install_win32
  125. native_install: install_$(OS_SRC)
  126. install_go32v1:
  127. make -C go32v1 install
  128. install_go32v2:
  129. make -C go32v2 install
  130. install_linux:
  131. make -C linux install
  132. install_os2:
  133. make -C os2 install
  134. install_win32:
  135. make -C win32 install
  136. ############################################################################
  137. # LibInstall
  138. ############################################################################
  139. libinstall: libinstall_linux libinstall_go32v1 libinstall_go32v2 \
  140. libinstall_os2 libinstall_win32
  141. native_libinstall: libinstall_$(OS_SOURCE)
  142. libinstall_go32v1:
  143. make -C go32v1 libinstall
  144. libinstall_go32v2:
  145. make -C go32v2 libinstall
  146. libinstall_linux:
  147. make -C linux libinstall
  148. libinstall_os2:
  149. make -C os2 libinstall
  150. libinstall_win32:
  151. make -C win32 libinstall
  152. ############################################################################
  153. # Utils
  154. ############################################################################
  155. utils:
  156. make -C utils all
  157. utils_install:
  158. make -C utils install
  159. ############################################################################
  160. # Diffs
  161. ############################################################################
  162. diffs: diffs_rtl diffs_inc diffs_i386 diffs_m68k diffs_dos diffs_cfg \
  163. diffs_os2 diffs_go32v1 diffs_go32v2 diffs_linux diffs_win32 \
  164. diffs_template
  165. makefile.dif : makefile
  166. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/makefile > makefile.dif
  167. diffs_rtl: makefile.dif
  168. diffs_inc:
  169. make -C inc diffs
  170. diffs_i386:
  171. make -C i386 diffs
  172. diffs_m68k:
  173. make -C m68k diffs
  174. diffs_cfg:
  175. make -C cfg diffs
  176. diffs_template:
  177. make -C template diffs
  178. diffs_go32v1:
  179. make -C go32v1 diffs
  180. diffs_go32v2:
  181. make -C go32v2 diffs
  182. diffs_linux:
  183. make -C linux diffs
  184. diffs_os2:
  185. make -C os2 diffs
  186. diffs_win32:
  187. make -C win32 diffs
  188. diffclean:
  189. make -C template diffclean
  190. make -C dos diffclean
  191. make -C go32v1 diffclean
  192. make -C go32v2 diffclean
  193. make -C linux diffclean
  194. make -C os2 diffclean
  195. make -C win32 diffclean
  196. -$(DEL) *.dif
  197. #
  198. # $Log$
  199. # Revision 1.5 1999-02-24 15:59:04 michael
  200. # * fixed clean target
  201. #
  202. # Revision 1.4 1998/12/21 14:26:52 pierre
  203. # * go32v? directory change reflected
  204. #
  205. # Revision 1.3 1998/10/22 16:45:23 pierre
  206. # + added rtlamiga target
  207. #
  208. # Revision 1.2 1998/09/16 16:47:20 peter
  209. # * merged fixes
  210. #
  211. # Revision 1.1.2.1 1998/09/16 16:17:46 peter
  212. # * updates to install with go32,win32
  213. #
  214. # Revision 1.1 1998/09/10 14:19:02 peter
  215. # - renamed
  216. #
  217. # Revision 1.10 1998/09/04 17:32:36 pierre
  218. # * REDIR handling corrected
  219. #