Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 dos clean
  83. make -C go32v1 clean
  84. make -C go32v2 clean
  85. make -C linux clean
  86. make -C win32 clean
  87. make -C os2 clean
  88. make -C utils clean
  89. -$(DEL) *.dif
  90. ############################################################################
  91. # RTLs
  92. ############################################################################
  93. native: rtl$(OS_SOURCE)
  94. rtls: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32
  95. rtlgo32v1:
  96. make -C go32v1
  97. rtlgo32v2:
  98. make -C go32v2
  99. rtllinux:
  100. make -C linux
  101. rtlos2:
  102. make -C os2
  103. rtlwin32:
  104. make -C win32
  105. rtlamiga:
  106. make -C amiga
  107. ############################################################################
  108. # Libs
  109. ############################################################################
  110. nativelibs : $(OS_SOURCE)libs
  111. libs: go32v1libs go32v2libs linuxlibs os2libs win32libs
  112. go32v1libs:
  113. make -C go32v1 libs
  114. go32v2libs:
  115. make -C go32v2 libs
  116. linuxlibs:
  117. make -C linux libs
  118. os2libs:
  119. make -C os2 libs
  120. win32libs:
  121. make -C win32 libs
  122. ############################################################################
  123. # Install
  124. ############################################################################
  125. install: install_linux install_go32v1 install_go32v2 install_os2 install_win32
  126. native_install: install_$(OS_SRC)
  127. install_go32v1:
  128. make -C go32v1 install
  129. install_go32v2:
  130. make -C go32v2 install
  131. install_linux:
  132. make -C linux install
  133. install_os2:
  134. make -C os2 install
  135. install_win32:
  136. make -C win32 install
  137. ############################################################################
  138. # LibInstall
  139. ############################################################################
  140. libinstall: libinstall_linux libinstall_go32v1 libinstall_go32v2 \
  141. libinstall_os2 libinstall_win32
  142. native_libinstall: libinstall_$(OS_SOURCE)
  143. libinstall_go32v1:
  144. make -C go32v1 libinstall
  145. libinstall_go32v2:
  146. make -C go32v2 libinstall
  147. libinstall_linux:
  148. make -C linux libinstall
  149. libinstall_os2:
  150. make -C os2 libinstall
  151. libinstall_win32:
  152. make -C win32 libinstall
  153. ############################################################################
  154. # Utils
  155. ############################################################################
  156. utils:
  157. make -C utils all
  158. utils_install:
  159. make -C utils install
  160. ############################################################################
  161. # Diffs
  162. ############################################################################
  163. diffs: diffs_rtl diffs_inc diffs_i386 diffs_m68k diffs_dos diffs_cfg \
  164. diffs_os2 diffs_go32v1 diffs_go32v2 diffs_linux diffs_win32 \
  165. diffs_template
  166. makefile.dif : makefile
  167. -$(DIFF) $(DIFFOPTS) makefile $(REFPATH)/makefile > makefile.dif
  168. diffs_rtl: makefile.dif
  169. diffs_inc:
  170. make -C inc diffs
  171. diffs_i386:
  172. make -C i386 diffs
  173. diffs_m68k:
  174. make -C m68k diffs
  175. diffs_cfg:
  176. make -C cfg diffs
  177. diffs_template:
  178. make -C template diffs
  179. diffs_go32v1:
  180. make -C go32v1 diffs
  181. diffs_go32v2:
  182. make -C go32v2 diffs
  183. diffs_linux:
  184. make -C linux diffs
  185. diffs_os2:
  186. make -C os2 diffs
  187. diffs_win32:
  188. make -C win32 diffs
  189. diffclean:
  190. make -C template diffclean
  191. make -C dos diffclean
  192. make -C go32v1 diffclean
  193. make -C go32v2 diffclean
  194. make -C linux diffclean
  195. make -C os2 diffclean
  196. make -C win32 diffclean
  197. -$(DEL) *.dif
  198. #
  199. # $Log$
  200. # Revision 1.4 1998-12-21 14:26:52 pierre
  201. # * go32v? directory change reflected
  202. #
  203. # Revision 1.3 1998/10/22 16:45:23 pierre
  204. # + added rtlamiga target
  205. #
  206. # Revision 1.2 1998/09/16 16:47:20 peter
  207. # * merged fixes
  208. #
  209. # Revision 1.1.2.1 1998/09/16 16:17:46 peter
  210. # * updates to install with go32,win32
  211. #
  212. # Revision 1.1 1998/09/10 14:19:02 peter
  213. # - renamed
  214. #
  215. # Revision 1.10 1998/09/04 17:32:36 pierre
  216. # * REDIR handling corrected
  217. #