Makefile.in.plugins_examples 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # This library is free software; you can redistribute it and/or
  2. # modify it under the terms of the GNU Lesser General Public
  3. # License as published by the Free Software Foundation; either
  4. # version 2.1 of the License, or (at your option) any later version.
  5. # You may obtain a copy of the Licence at
  6. # http://www.gnu.org/licences/lgpl.html
  7. #
  8. # As a special exception this file can also be included in modules
  9. # with other source code as long as that source code has been
  10. # released under an Open Source Initiative certified licence.
  11. # More information about OSI certification can be found at:
  12. # http://www.opensource.org
  13. #
  14. # This module is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU Lesser General Public Licence for more details.
  18. #
  19. # This module was created by members of the firebird development
  20. # team. All individual contributions remain the Copyright (C) of
  21. # those individuals and all rights are reserved. Contributors to
  22. # this file are either listed below or can be obtained from a CVS
  23. # history command.
  24. #
  25. # Created by: Mark O'Donohue <[email protected]>
  26. #
  27. # Contributor(s):
  28. # Adriano dos Santos Fernandes
  29. #
  30. ROOT=$(shell cd ..; pwd)
  31. ifeq ($(IsDeveloper), Y)
  32. DefaultTarget := Debug
  33. else
  34. DefaultTarget := Release
  35. endif
  36. CPPFLAGS += -std=c++20 -I$(FB_BUILD)/include
  37. include $(ROOT)/gen/make.defaults
  38. ifeq ($(CROSS_OUT), Y)
  39. include $(ROOT)/gen/make.crossPlatform
  40. else
  41. include $(ROOT)/gen/make.platform
  42. endif
  43. ifeq ($(PLATFORM),DARWIN)
  44. CPPFLAGS += -stdlib=libc++
  45. endif
  46. include $(ROOT)/gen/make.rules
  47. include $(ROOT)/gen/make.shared.variables
  48. @SET_MAKE@
  49. .PHONY: all udrcpp_example dc_example kh_example crypt_app
  50. all: udrcpp_example dc_example kh_example crypt_app
  51. UDR_Objects = $(call dirObjects,../examples/udr)
  52. UDR_Plugin = $(PLUGINS)/udr/$(LIB_PREFIX)udrcpp_example.$(SHRLIB_EXT)
  53. AllObjects = $(UDR_Objects)
  54. udrcpp_example: $(UDR_Plugin)
  55. $(UDR_Plugin): $(UDR_Objects)
  56. ifeq ($(PLATFORM),DARWIN)
  57. $(LIB_LINK) $(LIB_BUNDLE_OPTIONS) -o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ \
  58. $(FIREBIRD_LIBRARY_LINK)
  59. else
  60. $(LIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)udrcpp_example.$(SHRLIB_EXT) \
  61. $(LIB_PATH_OPTS) -o $@ $^ $(THR_LIBS) \
  62. $(FIREBIRD_LIBRARY_LINK)
  63. endif
  64. DC_Objects = $(call makeObjects,../examples/dbcrypt,DbCrypt.cpp)
  65. DC_Plugin = $(call makePluginName,fbSampleDbCrypt)
  66. AllObjects += $(DC_Objects)
  67. dc_example: $(DC_Plugin)
  68. $(DC_Plugin): $(DC_Objects)
  69. $(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)
  70. $(CP) $(EXA_ROOT)/dbcrypt/fbSampleDbCrypt.conf $(PLUGINS)
  71. KH_Objects = $(call makeObjects,../examples/dbcrypt,CryptKeyHolder.cpp)
  72. KH_Plugin = $(call makePluginName,fbSampleKeyHolder)
  73. AllObjects += $(KH_Objects)
  74. kh_example: $(KH_Plugin)
  75. $(KH_Plugin): $(KH_Objects)
  76. $(LINK_PLUGIN) $(call LIB_LINK_SONAME,$(notdir $@).0) -o $@ $^ $(LINK_PLUG_LIBS) $(FIREBIRD_LIBRARY_LINK)
  77. $(CP) $(EXA_ROOT)/dbcrypt/fbSampleKeyHolder.conf $(PLUGINS)
  78. CA_Objects = $(call makeObjects,../examples/dbcrypt,CryptApplication.cpp)
  79. CRYPT_APP = $(BIN)/fbSampleDbCryptApp$(EXEC_EXT)
  80. AllObjects += $(CA_Objects)
  81. crypt_app: $(CRYPT_APP)
  82. $(CRYPT_APP): $(CA_Objects)
  83. $(EXE_LINK) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK)
  84. include $(ROOT)/gen/make.shared.targets
  85. Dependencies = $(AllObjects:.o=.d)
  86. -include $(Dependencies)