Makefile 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. #
  2. # $Id$
  3. # Copyright (c) 1998 by the Free Pascal Development Team
  4. #
  5. # Makefile for Free Pascal Environment
  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. # We always need the API and FV
  20. NEEDUNITDIR=../../api ../../fv
  21. # when making a full version include the compiler
  22. ifeq ($(FULL),1)
  23. override NEEDUNITDIR+=../../compiler
  24. override NEEDOPT+=-dBrowserCol -dGDB -Sg
  25. else
  26. override NEEDUNITDIR+=../fake/compiler
  27. endif
  28. # when including debugger include the gdbinterface
  29. ifndef GDBINT
  30. GDBINT=gdbint
  31. endif
  32. ifeq ($(GDB),1)
  33. override NEEDUNITDIR+=../../$(GDBINT)
  34. NEEDLIBDIR+=../../$(GDBINT)/libgdb
  35. NEEDOBJDIR+=../../$(GDBINT)/libgdb
  36. else
  37. override NEEDUNITDIR+=../fake/gdb
  38. endif
  39. #####################################################################
  40. # Real targets
  41. #####################################################################
  42. UNITOBJECTS=
  43. EXEOBJECTS=fp
  44. #####################################################################
  45. # Common targets
  46. #####################################################################
  47. .PHONY: all clean install info \
  48. staticlib sharedlib libsclean \
  49. staticinstall sharedinstall libinstall \
  50. all: testfpcmake fpc_all
  51. info: testfpcmake fpc_info
  52. staticlib: testfpcmake fpc_staticlib
  53. sharedlib: testfpcmake fpc_sharedlib
  54. libsclean: testfpcmake fpc_libsclean
  55. staticinstall: testfpcmake fpc_staticinstall
  56. sharedinstall: testfpcmake fpc_sharedinstall
  57. libinstall: testfpcmake fpc_libinstall
  58. #####################################################################
  59. # Include default makefile
  60. #####################################################################
  61. # test if FPCMAKE is still valid
  62. ifdef FPCMAKE
  63. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  64. FPCDIR=
  65. FPCMAKE=
  66. endif
  67. endif
  68. ifndef FPCDIR
  69. ifdef DEFAULTFPCDIR
  70. FPCDIR=$(DEFAULTFPCDIR)
  71. endif
  72. endif
  73. ifndef FPCMAKE
  74. ifdef FPCDIR
  75. FPCMAKE=$(FPCDIR)/makefile.fpc
  76. else
  77. FPCMAKE=makefile.fpc
  78. endif
  79. endif
  80. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  81. ifeq ($(FPCMAKE),)
  82. testfpcmake:
  83. @echo makefile.fpc not found!
  84. @echo Check the FPCMAKE and FPCDIR environment variables.
  85. @exit
  86. else
  87. include $(FPCMAKE)
  88. testfpcmake:
  89. endif
  90. #####################################################################
  91. # Dependencies
  92. #####################################################################
  93. ifdef inlinux
  94. LIBDIR=/usr/lib/gcc-lib/i486-linux/2.7.2.3
  95. endif
  96. fp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)
  97. gdb:
  98. make all GDB=1
  99. full:
  100. make all FULL=1
  101. fullgdb:
  102. make all FULL=1 GDB=1
  103. # This is necessary because we don't have all units separate in the
  104. # units targets
  105. clean : testfpcmake fpc_cleanall
  106. #
  107. # Installation
  108. #
  109. install: fpc_install
  110. $(INSTALL) $(wildcard *.pt) $(wildcard *.tdf) $(BININSTALLDIR)
  111. #
  112. # Misc
  113. #
  114. clean_compiler:
  115. make -C ../../compiler clean
  116. #
  117. # $Log$
  118. # Revision 1.14 1999-03-16 00:47:00 peter
  119. # * makefile.fpc targets start with fpc_
  120. # * small updates for install scripts
  121. #
  122. # Revision 1.13 1999/03/09 01:35:52 peter
  123. # * makefile.fpc updates and defaultfpcdir var
  124. #
  125. #