makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # The contents of this file are subject to the Initial
  3. # Developer's Public License Version 1.0 (the "License");
  4. # you may not use this file except in compliance with the
  5. # License. You may obtain a copy of the License at
  6. # https://www.ibphoenix.com/about/firebird/idpl.
  7. #
  8. # Software distributed under the License is distributed AS IS,
  9. # WITHOUT WARRANTY OF ANY KIND, either express or implied.
  10. # See the License for the specific language governing rights
  11. # and limitations under the License.
  12. #
  13. # The Original Code was created by Paul Reeves for IBPhoenix
  14. # and the Firebird Open Source RDBMS project.
  15. #
  16. # Copyright (c) 2020 Paul Reeves and all contributors signed below.
  17. #
  18. # All Rights Reserved.
  19. # Contributor(s): ______________________________________.
  20. #
  21. # -----------------------------------------------------------------------
  22. # Firebird Installation Directory
  23. #
  24. # Change this definition to point to your Firebird installation directory
  25. # -----------------------------------------------------------------------
  26. FIREBIRD = /opt/firebird
  27. INCLUDE_FB = $(FIREBIRD)/include/firebird
  28. FBCLIENT = $(FIREBIRD)/lib/libfbclient.so
  29. # Directory to store compiled unit files
  30. UNITBINDIR = lib
  31. # ---------------------------------------------------------------------
  32. # General Compiler and linker Defines for Free Pascal
  33. # ---------------------------------------------------------------------
  34. FPC = fpc
  35. FPCFLAGS = -g -Fucommon -Fu$(INCLUDE_FB) -FU$(UNITBINDIR) -Mdelphi -FE.
  36. RM = rm -f
  37. OBJECTS = $(UNITBINDIR)/*
  38. OUTBIN = 01.create 02.update 03.select
  39. # To Do...
  40. # 04.print_table 05.user_metadata.cpp 06.fb_message 07.blob 08.events 09.service 10.backup 11.batch 12.batch_isc 13.null_pk
  41. .PHONY: clean all
  42. .SUFFIXES: .pas
  43. .pas:
  44. -mkdir $(UNITBINDIR)
  45. $(FPC) $(FPCFLAGS) $<
  46. all: $(OUTBIN)
  47. 01.create: 01.create.pas
  48. 02.update: 02.update.pas
  49. 03.select: 03.select.pas
  50. # clean up
  51. clean:
  52. $(RM) $(OBJECTS) $(OUTBIN) fbtests.fdb
  53. -rm -d $(UNITBINDIR)