Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. #
  2. # $Id$
  3. # Copyright (c) 1998 by the Free Pascal Development Team
  4. #
  5. # Makefile for Free Pascal Source Tree
  6. #
  7. # See the file COPYING.FPC, included in this distribution,
  8. # for details about the copyright.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. #####################################################################
  15. # Config
  16. #####################################################################
  17. MODULES=compiler rtl api fv gdb ide
  18. ifndef APIDIR
  19. APIDIR=api
  20. endif
  21. ifndef FVDIR
  22. FVDIR=fv
  23. endif
  24. ifndef GDBDIR
  25. GDBDIR=gdbint
  26. endif
  27. ifndef FPINSTDIR
  28. FPINSTDIR=fpinst
  29. endif
  30. ifndef IDEDIR
  31. IDEDIR=ide/text
  32. endif
  33. #####################################################################
  34. # Defaults
  35. #####################################################################
  36. RELEASE=1
  37. NODEFAULTRULES=1
  38. #####################################################################
  39. # Include default makefile
  40. #####################################################################
  41. ifndef FPCMAKE
  42. ifdef FPCDIR
  43. FPCMAKE=$(FPCDIR)/makefile.fpc
  44. else
  45. FPCMAKE=makefile.fpc
  46. endif
  47. endif
  48. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  49. ifeq ($(FPCMAKE),)
  50. nofpcmake:
  51. @echo
  52. @echo makefile.fpc not found!
  53. @echo Check the FPCMAKE and FPCDIR environment variables.
  54. @echo
  55. @exit
  56. else
  57. include $(FPCMAKE)
  58. endif
  59. #####################################################################
  60. # Dependencies
  61. #####################################################################
  62. .PHONY: all clean install staticinstall sharedinstall \
  63. $(addsuffix _all,$(MODULES)) \
  64. $(addsuffix _clean,$(MODULES)) \
  65. $(addsuffix _install,$(MODULES)) \
  66. $(addsuffix _staticinstall,$(MODULES)) \
  67. $(addsuffix _sharedinstall,$(MODULES))
  68. info:
  69. @echo
  70. @echo Please use one of the following targets:
  71. @echo
  72. @echo $(MODULES)
  73. @echo
  74. @echo All targets can follow after a _ with:
  75. @echo all,clean,install,staticinstall,sharedinstall
  76. @echo
  77. @echo example: make api_staticinstall
  78. @exit
  79. #######################################
  80. # Compiler
  81. #######################################
  82. compiler_all:
  83. $(MAKE) -C compiler cycle
  84. compiler_clean:
  85. $(MAKE) -C compiler clean
  86. compiler_install:
  87. $(MAKE) -C compiler install
  88. compiler_staticinstall:
  89. compiler_sharedinstall:
  90. #######################################
  91. # RTL
  92. #######################################
  93. rtl_all:
  94. $(MAKE) -C rtl/$(OS_TARGET) all
  95. rtl_clean:
  96. $(MAKE) -C rtl/$(OS_TARGET) clean
  97. rtl_install:
  98. $(MAKE) -C rtl/$(OS_TARGET) install
  99. rtl_staticinstall:
  100. $(MAKE) -C rtl/$(OS_TARGET) staticlibinstall
  101. rtl_sharedinstall:
  102. $(MAKE) -C rtl/$(OS_TARGET) sharedlibinstall
  103. #######################################
  104. # API
  105. #######################################
  106. api_all: rtl_all
  107. $(MAKE) -C $(APIDIR) all
  108. api_clean:
  109. $(MAKE) -C $(APIDIR) clean
  110. api_install:
  111. $(MAKE) -C $(APIDIR) install
  112. api_staticinstall:
  113. $(MAKE) -C $(APIDIR) staticlibinstall
  114. api_sharedinstall:
  115. $(MAKE) -C $(APIDIR) sharedlibinstall
  116. #######################################
  117. # FV
  118. #######################################
  119. fv_all: rtl_all api_all
  120. $(MAKE) -C $(FVDIR) all
  121. fv_clean:
  122. $(MAKE) -C $(FVDIR) clean
  123. fv_install:
  124. $(MAKE) -C $(FVDIR) install
  125. fv_staticinstall:
  126. $(MAKE) -C $(FVDIR) staticlibinstall
  127. fv_sharedinstall:
  128. $(MAKE) -C $(FVDIR) sharedlibinstall
  129. #######################################
  130. # GDB
  131. #######################################
  132. gdb_all: rtl_all
  133. $(MAKE) -C $(GDBDIR) all
  134. gdb_clean:
  135. $(MAKE) -C $(GDBDIR) clean
  136. gdb_install:
  137. $(MAKE) -C $(GDBDIR) install
  138. gdb_staticinstall:
  139. $(MAKE) -C $(GDBDIR) staticlibinstall
  140. gdb_sharedinstall:
  141. $(MAKE) -C $(GDBDIR) sharedlibinstall
  142. #######################################
  143. # FPC fpinst
  144. #######################################
  145. fpinst_all: rtl_all api_all fv_all
  146. $(MAKE) -C $(FPINSTDIR) all
  147. fpinst_clean:
  148. $(MAKE) -C $(FPINSTDIR) clean
  149. fpinst_install:
  150. $(MAKE) -C $(FPINSTDIR) install
  151. fpinst_staticinstall:
  152. $(MAKE) -C $(FPINSTDIR) staticlibinstall
  153. fpinst_sharedinstall:
  154. $(MAKE) -C $(FPINSTDIR) sharedlibinstall
  155. #######################################
  156. # IDE
  157. #######################################
  158. ide_all: rtl_all api_all fv_all
  159. $(MAKE) -C $(IDEDIR) all
  160. ide_gdb: rtl_all api_all fv_all gdb_all
  161. $(MAKE) -C $(IDEDIR) gdb
  162. ide_full: rtl_all api_all fv_all
  163. $(MAKE) -C $(IDEDIR) full
  164. ide_fullgdb: rtl_all api_all fv_all gdb_all
  165. $(MAKE) -C $(IDEDIR) fullgdb
  166. ide_clean:
  167. $(MAKE) -C $(IDEDIR) clean
  168. ide_install:
  169. $(MAKE) -C $(IDEDIR) install
  170. ide_staticinstall:
  171. $(MAKE) -C $(IDEDIR) staticlibinstall
  172. ide_sharedinstall:
  173. $(MAKE) -C $(IDEDIR) sharedlibinstall
  174. #######################################
  175. # Common targets all,install,clean
  176. #######################################
  177. all: $(addsuffix _all,$(MODULES))
  178. clean: $(addsuffix _clean,$(MODULES))
  179. install: $(addsuffix _install,$(MODULES))
  180. staticinstall: $(addsuffix _staticinstall,$(MODULES))
  181. sharedinstall: $(addsuffix _sharedinstall,$(MODULES))
  182. #######################################
  183. # Special targets
  184. #######################################
  185. export PACKAGEDIR=$(BASEDIR)
  186. idezips: clean
  187. $(MAKE) ide_all
  188. $(MAKE) -C $(IDEDIR) zipinstall ZIPNAME=ide_fake
  189. $(MAKE) ide_clean
  190. $(MAKE) ide_gdb
  191. $(MAKE) -C $(IDEDIR) zipinstall ZIPNAME=ide_gdb
  192. $(MAKE) ide_clean
  193. $(MAKE) ide_full
  194. $(MAKE) -C $(IDEDIR) zipinstall ZIPNAME=ide_comp
  195. $(MAKE) ide_clean
  196. $(MAKE) ide_fullgdb
  197. $(MAKE) -C $(IDEDIR) zipinstall ZIPNAME=ide_full
  198. #######################################
  199. # Defaults
  200. #######################################
  201. #
  202. # $Log$
  203. # Revision 1.6 1999-02-22 02:17:36 peter
  204. # * fixed dos linebreaks
  205. #
  206. # Revision 1.5 1999/02/19 16:46:07 peter
  207. # + fpinst_ targets for the isntaller
  208. #
  209. # Revision 1.4 1999/02/19 15:33:01 peter
  210. # + idezips target
  211. #
  212. # Revision 1.3 1999/02/16 00:50:12 peter
  213. # + ide_all,ide_gdb,ide_full,ide_fullgdb targets
  214. #
  215. # Revision 1.2 1999/01/28 19:58:19 peter
  216. # * makefile updates
  217. #
  218. # Revision 1.1 1999/01/21 11:48:39 peter
  219. # * initial version
  220. #
  221. #