Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for Free Component Library for Linux
  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. # Include files
  20. INC=../inc
  21. PROCINC=../$(CPU)
  22. # Where to place the files
  23. TARGETDIR=.
  24. # We need always -S2
  25. NEEDOPT=-S2
  26. # As default make only the units
  27. DEFAULTUNITS=1
  28. #####################################################################
  29. # Real targets
  30. #####################################################################
  31. # INCUNITS is defined in makefile.inc
  32. # They are default units for all platforms.
  33. include $(INC)/Makefile.inc
  34. UNITOBJECTS=$(INCUNITS)
  35. EXEOBJECTS=
  36. #####################################################################
  37. # Common targets
  38. #####################################################################
  39. .PHONY: all clean install info \
  40. staticlib sharedlib libsclean \
  41. staticinstall sharedinstall libinstall \
  42. all: testfpcmake fpc_all
  43. clean: testfpcmake fpc_clean
  44. install: testfpcmake fpc_install
  45. info: testfpcmake fpc_info
  46. staticlib: testfpcmake fpc_staticlib
  47. sharedlib: testfpcmake fpc_sharedlib
  48. libsclean: testfpcmake fpc_libsclean
  49. staticinstall: testfpcmake fpc_staticinstall
  50. sharedinstall: testfpcmake fpc_sharedinstall
  51. libinstall: testfpcmake fpc_libinstall
  52. #####################################################################
  53. # Include default makefile
  54. #####################################################################
  55. # test if FPCMAKE is still valid
  56. ifdef FPCMAKE
  57. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  58. FPCDIR=
  59. FPCMAKE=
  60. endif
  61. endif
  62. ifndef FPCDIR
  63. ifdef DEFAULTFPCDIR
  64. FPCDIR=$(DEFAULTFPCDIR)
  65. endif
  66. endif
  67. ifndef FPCMAKE
  68. ifdef FPCDIR
  69. FPCMAKE=$(FPCDIR)/makefile.fpc
  70. else
  71. FPCMAKE=makefile.fpc
  72. endif
  73. endif
  74. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  75. ifeq ($(FPCMAKE),)
  76. testfpcmake:
  77. @echo makefile.fpc not found!
  78. @echo Check the FPCMAKE and FPCDIR environment variables.
  79. @exit
  80. else
  81. include $(FPCMAKE)
  82. testfpcmake:
  83. endif
  84. #####################################################################
  85. # Dependencies
  86. #####################################################################
  87. vpath %$(PASEXT) $(INC)
  88. INCFILES=$(addprefix $(INC)/,$(INCNAMES))
  89. classes$(PPUEXT): $(INCFILES) classes$(PASEXT)
  90. #
  91. # $Log$
  92. # Revision 1.8 1999-04-08 15:58:44 michael
  93. # + INCUNITS added
  94. #
  95. # Revision 1.7 1999/04/08 10:18:59 peter
  96. # * makefile updates
  97. #
  98. #