Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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=-S2
  23. # Needed unit dir, which is searched as the first path
  24. NEEDUNITDIR=
  25. # Define if pq library is not in /usr/lib
  26. # POSTGRESLIBDIR=
  27. # Where need we to place the executables/ppu/objects
  28. TARGETDIR=
  29. UNITTARGETDIR=
  30. # As default make only the units
  31. #DEFAULTUNITS=1
  32. # Uncomment this is the makefile.fpc isn't located in ../..
  33. DEFAULTFPCDIR=../..
  34. #####################################################################
  35. # Real targets
  36. #####################################################################
  37. UNITOBJECTS=dllist postgres
  38. EXEOBJECTS=testpg testemail
  39. #####################################################################
  40. # Common targets
  41. #####################################################################
  42. ifdef POSTGRESLIBDIR
  43. override NEEDLIBDIR+=$(POSTGRESLIBDIR)
  44. endif
  45. #####################################################################
  46. # Common targets
  47. #####################################################################
  48. .PHONY: all clean install info \
  49. staticlib sharedlib libsclean \
  50. staticinstall sharedinstall libinstall \
  51. all: testfpcmake fpc_all
  52. clean: testfpcmake fpc_clean
  53. install: testfpcmake fpc_install
  54. info: testfpcmake fpc_info
  55. staticlib: testfpcmake fpc_staticlib
  56. sharedlib: testfpcmake fpc_sharedlib
  57. libsclean: testfpcmake fpc_libsclean
  58. staticinstall: testfpcmake fpc_staticinstall
  59. sharedinstall: testfpcmake fpc_sharedinstall
  60. libinstall: testfpcmake fpc_libinstall
  61. #####################################################################
  62. # Include default makefile
  63. #####################################################################
  64. # test if FPCMAKE is still valid
  65. ifdef FPCMAKE
  66. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  67. FPCDIR=
  68. FPCMAKE=
  69. endif
  70. endif
  71. ifndef FPCDIR
  72. ifdef DEFAULTFPCDIR
  73. FPCDIR=$(DEFAULTFPCDIR)
  74. endif
  75. endif
  76. ifndef FPCMAKE
  77. ifdef FPCDIR
  78. FPCMAKE=$(FPCDIR)/makefile.fpc
  79. else
  80. FPCMAKE=makefile.fpc
  81. endif
  82. endif
  83. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  84. ifeq ($(FPCMAKE),)
  85. testfpcmake:
  86. @echo makefile.fpc not found!
  87. @echo Check the FPCMAKE and FPCDIR environment variables.
  88. @exit
  89. else
  90. include $(FPCMAKE)
  91. testfpcmake:
  92. endif
  93. #####################################################################
  94. # Dependencies
  95. #####################################################################
  96. mysql$(PPUEXT): mysql$(PASEXT) mysql_com$(PPUEXT)
  97. testdb$(EXEEXT): testdb$(PASEXT) mysql$(PPUEXT)
  98. #
  99. # $Log$
  100. # Revision 1.1 1999-05-12 00:11:26 michael
  101. # initial import
  102. #
  103. # Revision 1.1 1999/03/16 00:50:29 peter
  104. # + init
  105. #
  106. #