Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for Free Component Library
  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. # Defaults
  16. #####################################################################
  17. # Default place of the makefile.fpc
  18. DEFAULTFPCDIR=..
  19. #####################################################################
  20. # Common targets
  21. #####################################################################
  22. .PHONY: all clean install info \
  23. staticlib sharedlib libsclean \
  24. staticinstall sharedinstall libinstall \
  25. all: testfpcmake
  26. $(MAKE) -C $(OS_TARGET) all
  27. clean: testfpcmake
  28. $(MAKE) -C go32v2 clean
  29. $(MAKE) -C linux clean
  30. $(MAKE) -C win32 clean
  31. $(MAKE) -C os2 clean
  32. $(MAKE) -C tests clean
  33. install: testfpcmake
  34. $(MAKE) -C $(OS_TARGET) install
  35. info: testfpcmake fpc_info
  36. staticlib: testfpcmake
  37. $(MAKE) -C $(OS_TARGET) staticlib
  38. sharedlib: testfpcmake
  39. $(MAKE) -C $(OS_TARGET) sharedlib
  40. libsclean: testfpcmake
  41. $(MAKE) -C $(OS_TARGET) libsclean
  42. staticinstall: testfpcmake
  43. $(MAKE) -C $(OS_TARGET) staticinstall
  44. sharedinstall: testfpcmake
  45. $(MAKE) -C $(OS_TARGET) sharedinstall
  46. libinstall: testfpcmake
  47. $(MAKE) -C $(OS_TARGET) libinstall
  48. #####################################################################
  49. # Include default makefile
  50. #####################################################################
  51. # test if FPCMAKE is still valid
  52. ifdef FPCMAKE
  53. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  54. FPCDIR=
  55. FPCMAKE=
  56. endif
  57. endif
  58. ifndef FPCDIR
  59. ifdef DEFAULTFPCDIR
  60. FPCDIR=$(DEFAULTFPCDIR)
  61. endif
  62. endif
  63. ifndef FPCMAKE
  64. ifdef FPCDIR
  65. FPCMAKE=$(FPCDIR)/makefile.fpc
  66. else
  67. FPCMAKE=makefile.fpc
  68. endif
  69. endif
  70. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  71. ifeq ($(FPCMAKE),)
  72. testfpcmake:
  73. @echo makefile.fpc not found!
  74. @echo Check the FPCMAKE and FPCDIR environment variables.
  75. @exit 1
  76. else
  77. include $(FPCMAKE)
  78. testfpcmake:
  79. endif
  80. #####################################################################
  81. # Dependencies
  82. #####################################################################
  83. .PHONY: tests examples go32v2 linux os win32
  84. #
  85. # Examples
  86. #
  87. examples: tests
  88. tests: all
  89. $(MAKE) -C tests all
  90. #
  91. # Specific OS
  92. #
  93. go32v2:
  94. $(MAKE) -C go32v2
  95. linux:
  96. $(MAKE) -C linux
  97. os2:
  98. $(MAKE) -C os2
  99. win32:
  100. $(MAKE) -C win32
  101. #
  102. # $Log$
  103. # Revision 1.3 1999-04-08 10:18:47 peter
  104. # * makefile updates
  105. #
  106. #