Makefile 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 IDEDIR
  28. IDEDIR=ide/text
  29. endif
  30. #####################################################################
  31. # Defaults
  32. #####################################################################
  33. RELEASE=1
  34. NODEFAULTRULES=1
  35. #####################################################################
  36. # Include default makefile
  37. #####################################################################
  38. ifndef FPCMAKE
  39. ifdef FPCDIR
  40. FPCMAKE=$(FPCDIR)/makefile.fpc
  41. else
  42. FPCMAKE=makefile.fpc
  43. endif
  44. endif
  45. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  46. ifeq ($(FPCMAKE),)
  47. nofpcmake:
  48. @echo
  49. @echo makefile.fpc not found!
  50. @echo Check the FPCMAKE and FPCDIR environment variables.
  51. @echo
  52. @exit
  53. else
  54. include $(FPCMAKE)
  55. endif
  56. #####################################################################
  57. # Dependencies
  58. #####################################################################
  59. .PHONY: all clean install staticinstall sharedinstall \
  60. $(addsuffix _all,$(MODULES)) \
  61. $(addsuffix _clean,$(MODULES)) \
  62. $(addsuffix _install,$(MODULES)) \
  63. $(addsuffix _staticinstall,$(MODULES)) \
  64. $(addsuffix _sharedinstall,$(MODULES))
  65. info:
  66. @echo
  67. @echo Please use one of the following targets:
  68. @echo
  69. @echo $(MODULES)
  70. @echo
  71. @echo All targets can follow after a _ with:
  72. @echo all,clean,install,staticinstall,sharedinstall
  73. @echo
  74. @echo example: make api_staticinstall
  75. @exit
  76. #######################################
  77. # Compiler
  78. #######################################
  79. compiler_all:
  80. $(MAKE) -C compiler cycle
  81. compiler_clean:
  82. $(MAKE) -C compiler clean
  83. compiler_install:
  84. $(MAKE) -C compiler install
  85. compiler_staticinstall:
  86. compiler_sharedinstall:
  87. #######################################
  88. # RTL
  89. #######################################
  90. rtl_all:
  91. $(MAKE) -C rtl/$(OS_TARGET) all
  92. rtl_clean:
  93. $(MAKE) -C rtl/$(OS_TARGET) clean
  94. rtl_install:
  95. $(MAKE) -C rtl/$(OS_TARGET) install
  96. rtl_staticinstall:
  97. $(MAKE) -C rtl/$(OS_TARGET) staticlibinstall
  98. rtl_sharedinstall:
  99. $(MAKE) -C rtl/$(OS_TARGET) sharedlibinstall
  100. #######################################
  101. # API
  102. #######################################
  103. api_all: rtl_all
  104. $(MAKE) -C $(APIDIR) all
  105. api_clean:
  106. $(MAKE) -C $(APIDIR) clean
  107. api_install:
  108. $(MAKE) -C $(APIDIR) install
  109. api_staticinstall:
  110. $(MAKE) -C $(APIDIR) staticlibinstall
  111. api_sharedinstall:
  112. $(MAKE) -C $(APIDIR) sharedlibinstall
  113. #######################################
  114. # FV
  115. #######################################
  116. fv_all: rtl_all api_all
  117. $(MAKE) -C $(FVDIR) all
  118. fv_clean:
  119. $(MAKE) -C $(FVDIR) clean
  120. fv_install:
  121. $(MAKE) -C $(FVDIR) install
  122. fv_staticinstall:
  123. $(MAKE) -C $(FVDIR) staticlibinstall
  124. fv_sharedinstall:
  125. $(MAKE) -C $(FVDIR) sharedlibinstall
  126. #######################################
  127. # GDB
  128. #######################################
  129. gdb_all: rtl_all
  130. $(MAKE) -C $(GDBDIR) all
  131. gdb_clean:
  132. $(MAKE) -C $(GDBDIR) clean
  133. gdb_install:
  134. $(MAKE) -C $(GDBDIR) install
  135. gdb_staticinstall:
  136. $(MAKE) -C $(GDBDIR) staticlibinstall
  137. gdb_sharedinstall:
  138. $(MAKE) -C $(GDBDIR) sharedlibinstall
  139. #######################################
  140. # IDE
  141. #######################################
  142. ide_all: rtl_all api_all fv_all gdb_all
  143. $(MAKE) -C $(IDEDIR) fullgdb
  144. ide_clean:
  145. $(MAKE) -C $(IDEDIR) clean
  146. ide_install:
  147. $(MAKE) -C $(IDEDIR) install
  148. ide_staticinstall:
  149. $(MAKE) -C $(IDEDIR) staticlibinstall
  150. ide_sharedinstall:
  151. $(MAKE) -C $(IDEDIR) sharedlibinstall
  152. #######################################
  153. # Common targets all,install,clean
  154. #######################################
  155. all: $(addsuffix _all,$(MODULES))
  156. clean: $(addsuffix _clean,$(MODULES))
  157. install: $(addsuffix _install,$(MODULES))
  158. staticinstall: $(addsuffix _staticinstall,$(MODULES))
  159. sharedinstall: $(addsuffix _sharedinstall,$(MODULES))
  160. #######################################
  161. # Defaults
  162. #######################################
  163. #
  164. # $Log$
  165. # Revision 1.2 1999-01-28 19:58:19 peter
  166. # * makefile updates
  167. #
  168. # Revision 1.1 1999/01/21 11:48:39 peter
  169. # * initial version
  170. #
  171. #