Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #
  2. # $Id$
  3. # Copyright (c) 1999 by the Free Pascal Development Team
  4. #
  5. # Makefile for database part of the Free Component Library
  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. # set target and cpu which are required
  20. #override OS_TARGET=linux
  21. override CPU=i386
  22. # Include files
  23. INC=../inc
  24. XML=../xml
  25. PROCINC=../$(CPU)
  26. # default library name
  27. LIBNAME=fpfcl
  28. # Where to place the files
  29. TARGETDIR=.
  30. # We need always -S2
  31. # add here the path to the mysql lib if it isn't in /usr/lib
  32. # Also add the path to the mysql units if not in the compiler path.
  33. NEEDOPT=-S2 -Fu../$(OS_TARGET)
  34. # we need lib gcc
  35. NEEDGCCLIB=yes
  36. # As default make only the units
  37. #DEFAULTUNITS=
  38. #####################################################################
  39. # Real targets
  40. #####################################################################
  41. # INCUNITS is defined in makefile.inc
  42. # They are default units for all platforms.
  43. include $(INC)/Makefile.inc
  44. include $(XML)/Makefile.inc
  45. UNITOBJECTS=db ddg_ds ddg_rec mysqldb
  46. EXEOBJECTS=testds createds mtest
  47. #####################################################################
  48. # Common targets
  49. #####################################################################
  50. .PHONY: all clean install info \
  51. staticlib sharedlib libsclean \
  52. staticinstall sharedinstall libinstall \
  53. all: testfpcmake fpc_all
  54. clean: testfpcmake fpc_clean
  55. install: testfpcmake fpc_install
  56. info: testfpcmake fpc_info
  57. staticlib: testfpcmake fpc_staticlib
  58. sharedlib: testfpcmake fpc_sharedlib
  59. libsclean: testfpcmake fpc_libsclean
  60. staticinstall: testfpcmake fpc_staticinstall
  61. sharedinstall: testfpcmake fpc_sharedinstall
  62. libinstall: testfpcmake fpc_libinstall
  63. #####################################################################
  64. # Include default makefile
  65. #####################################################################
  66. # test if FPCMAKE is still valid
  67. ifdef FPCMAKE
  68. ifeq ($(strip $(wildcard $(FPCMAKE))),)
  69. FPCDIR=
  70. FPCMAKE=
  71. endif
  72. endif
  73. ifndef FPCDIR
  74. ifdef DEFAULTFPCDIR
  75. FPCDIR=$(DEFAULTFPCDIR)
  76. endif
  77. endif
  78. ifndef FPCMAKE
  79. ifdef FPCDIR
  80. FPCMAKE=$(FPCDIR)/makefile.fpc
  81. else
  82. FPCMAKE=makefile.fpc
  83. endif
  84. endif
  85. override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
  86. ifeq ($(FPCMAKE),)
  87. testfpcmake:
  88. @echo makefile.fpc not found!
  89. @echo Check the FPCMAKE and FPCDIR environment variables.
  90. @exit
  91. else
  92. include $(FPCMAKE)
  93. testfpcmake:
  94. endif
  95. #####################################################################
  96. # Dependencies
  97. #####################################################################
  98. vpath %$(PASEXT) $(INC) $(XML)
  99. INCFILES=
  100. db$(PPUEXT): db.pp fields.inc dataset.inc dbs.inc
  101. ddg_ds$(PPUEXT): db$(PPUEXT) ddg_rec$(PPUEXT) ddg_ds$(PASEXT)
  102. testds$(EXEEXT): ddg_ds$(PPUEXT) testds$(PASEXT)
  103. createds$(EXEEXT): createds$(PASEXT) ddg_rec$(PPUEXT)
  104. mysqldb$(PPUEXT): db$(PPUEXT) mysqldb$(PASEXT)
  105. mtest$(EXEEXT): mysqldb$(PPUEXT) mtest$(PASEXT)
  106. #
  107. # $Log$
  108. # Revision 1.1 1999-10-24 16:15:38 michael
  109. # + Initial read-only implementation
  110. #