Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 is makefile.fpc by default
  18. DEFAULTFPCDIR=../..
  19. #####################################################################
  20. # Real targets
  21. #####################################################################
  22. UNITOBJECTS=inet
  23. EXEOBJECTS=testinet pfinger
  24. #####################################################################
  25. # Common targets
  26. #####################################################################
  27. .PHONY: all clean install info \
  28. staticlib sharedlib libsclean \
  29. staticinstall sharedinstall libinstall \
  30. all: testfpcmake fpc_all
  31. clean: testfpcmake fpc_clean
  32. install: testfpcmake fpc_install
  33. info: testfpcmake fpc_info
  34. staticlib: testfpcmake fpc_staticlib
  35. sharedlib: testfpcmake fpc_sharedlib
  36. libsclean: testfpcmake fpc_libsclean
  37. staticinstall: testfpcmake fpc_staticinstall
  38. sharedinstall: testfpcmake fpc_sharedinstall
  39. libinstall: testfpcmake fpc_libinstall
  40. #####################################################################
  41. # Include default makefile
  42. #####################################################################
  43. # test if FPCMAKE is still valid
  44. ifdef FPCMAKE
  45. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  46. FPCDIR=
  47. FPCMAKE=
  48. endif
  49. endif
  50. ifndef FPCDIR
  51. ifdef DEFAULTFPCDIR
  52. FPCDIR=$(DEFAULTFPCDIR)
  53. endif
  54. endif
  55. ifndef FPCMAKE
  56. ifdef FPCDIR
  57. FPCMAKE=$(FPCDIR)/makefile.fpc
  58. else
  59. FPCMAKE=makefile.fpc
  60. endif
  61. endif
  62. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  63. ifeq ($(FPCMAKE),)
  64. testfpcmake:
  65. @echo makefile.fpc not found!
  66. @echo Check the FPCMAKE and FPCDIR environment variables.
  67. @exit
  68. else
  69. include $(FPCMAKE)
  70. testfpcmake:
  71. endif
  72. #####################################################################
  73. # Dependencies
  74. #####################################################################
  75. testinet$(EXEEXT): testinet$(PASEXT) inet$(PPUEXT)
  76. pfinger$(EXEEXT): pfinger$(PASEXT) inet$(PPUEXT)
  77. #
  78. # $Log$
  79. # Revision 1.2 1999-06-08 18:28:24 peter
  80. # * fixes for 0.99.12 release
  81. #
  82. #