template 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for <template> for Free Pascal
  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. # Where are the include files located
  18. INC=
  19. PROCINC=
  20. OSINC=
  21. # Needed options, without it won't compile
  22. NEEDOPT=
  23. # Needed unit dir, which is searched as the first path
  24. NEEDUNITDIR=
  25. # Where need we to place the executables/ppu/objects
  26. TARGETDIR=
  27. UNITTARGETDIR=
  28. # As default make only the units
  29. #DEFAULTUNITS=1
  30. #####################################################################
  31. # Real targets
  32. #####################################################################
  33. UNITOBJECTS=
  34. EXEOBJECTS=
  35. #####################################################################
  36. # Common targets
  37. #####################################################################
  38. .PHONY: all clean install info \
  39. staticlib sharedlib libsclean \
  40. staticinstall sharedinstall libinstall \
  41. all: testfpcmake fpc_all
  42. clean: testfpcmake fpc_clean
  43. install: testfpcmake fpc_install
  44. info: testfpcmake fpc_info
  45. staticlib: testfpcmake fpc_staticlib
  46. sharedlib: testfpcmake fpc_sharedlib
  47. libsclean: testfpcmake fpc_libsclean
  48. staticinstall: testfpcmake fpc_staticinstall
  49. sharedinstall: testfpcmake fpc_sharedinstall
  50. libinstall: testfpcmake fpc_libinstall
  51. #####################################################################
  52. # Include default makefile
  53. #####################################################################
  54. # test if FPCMAKE is still valid
  55. ifdef FPCMAKE
  56. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  57. FPCDIR=
  58. FPCMAKE=
  59. endif
  60. endif
  61. ifndef FPCDIR
  62. ifdef DEFAULTFPCDIR
  63. FPCDIR=$(DEFAULTFPCDIR)
  64. endif
  65. endif
  66. ifndef FPCMAKE
  67. ifdef FPCDIR
  68. FPCMAKE=$(FPCDIR)/makefile.fpc
  69. else
  70. FPCMAKE=makefile.fpc
  71. endif
  72. endif
  73. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  74. ifeq ($(FPCMAKE),)
  75. testfpcmake:
  76. @echo makefile.fpc not found!
  77. @echo Check the FPCMAKE and FPCDIR environment variables.
  78. @exit
  79. else
  80. include $(FPCMAKE)
  81. testfpcmake:
  82. endif
  83. #####################################################################
  84. # Dependencies
  85. #####################################################################
  86. #
  87. # $Log$
  88. # Revision 1.1 1999-03-16 00:50:29 peter
  89. # + init
  90. #
  91. #