# This Makefile.am is in the public domain AM_CPPFLAGS = -I$(top_srcdir)/src/include plugindir = $(libdir)/taler pkgcfgdir = $(prefix)/share/taler/config.d/ pkgcfg_DATA = \ merchantdb-postgres.conf sqldir = $(prefix)/share/taler/sql/merchant/ sqlinputs = \ pg_*.sql \ procedures.sql.in sql_DATA = \ versioning.sql \ procedures.sql \ merchant-0001.sql \ merchant-0002.sql \ merchant-0003.sql \ merchant-0004.sql \ merchant-0005.sql \ merchant-0006.sql \ merchant-0007.sql \ merchant-0008.sql \ merchant-0009.sql \ merchant-0010.sql \ merchant-0011.sql \ merchant-0012.sql \ drop.sql BUILT_SOURCES = \ procedures.sql procedures.sql: procedures.sql.in pg_*.sql chmod +w $@ || true gcc -E -P -undef - < procedures.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@ chmod ugo-w $@ if HAVE_POSTGRESQL if HAVE_GNUNETPQ plugin_LTLIBRARIES = \ libtaler_plugin_merchantdb_postgres.la endif endif if USE_COVERAGE AM_CFLAGS = --coverage -O0 XLIB = -lgcov endif lib_LTLIBRARIES = \ libtalermerchantdb.la libtalermerchantdb_la_SOURCES = \ merchantdb_plugin.c \ merchantdb_helper.c libtalermerchantdb_la_LIBADD = \ $(LIBGCRYPT_LIBS) \ -ltalerutil \ -ltalerpq \ -lgnunetutil \ -lltdl \ $(XLIB) libtalermerchantdb_la_LDFLAGS = \ $(POSTGRESQL_LDFLAGS) \ -version-info 4:0:2 \ -no-undefined libtaler_plugin_merchantdb_postgres_la_SOURCES = \ pg_update_wirewatch_progress.h pg_update_wirewatch_progress.c \ pg_select_wirewatch_accounts.h pg_select_wirewatch_accounts.c \ pg_insert_account.h pg_insert_account.c \ pg_update_account.h pg_update_account.c \ pg_insert_deposit_to_transfer.h pg_insert_deposit_to_transfer.c \ pg_account_kyc_set_failed.h pg_account_kyc_set_failed.c \ pg_increase_refund.h pg_increase_refund.c \ pg_insert_transfer.h pg_insert_transfer.c \ pg_insert_transfer_details.h pg_insert_transfer_details.c \ pg_store_wire_fee_by_exchange.h pg_store_wire_fee_by_exchange.c \ pg_select_open_transfers.h pg_select_open_transfers.c \ pg_lookup_categories.h pg_lookup_categories.c \ pg_select_category_by_name.h pg_select_category_by_name.c \ pg_select_category.h pg_select_category.c \ pg_update_category.h pg_update_category.c \ pg_insert_category.h pg_insert_category.c \ pg_delete_category.h pg_delete_category.c \ pg_lookup_instances.h pg_lookup_instances.c \ pg_lookup_transfers.h pg_lookup_transfers.c \ pg_update_transfer_status.h pg_update_transfer_status.c \ pg_delete_exchange_accounts.h pg_delete_exchange_accounts.c \ pg_select_accounts_by_exchange.h pg_select_accounts_by_exchange.c \ pg_set_transfer_status_to_confirmed.h pg_set_transfer_status_to_confirmed.c \ pg_insert_exchange_account.h pg_insert_exchange_account.c \ pg_insert_login_token.h pg_insert_login_token.c \ pg_delete_login_token.h pg_delete_login_token.c \ pg_select_login_token.h pg_select_login_token.c \ pg_select_account_by_uri.h pg_select_account_by_uri.c \ pg_lookup_instance_auth.h pg_lookup_instance_auth.c \ pg_lookup_pending_deposits.h pg_lookup_pending_deposits.c \ pg_insert_instance.h pg_insert_instance.c \ pg_account_kyc_set_status.h pg_account_kyc_set_status.c \ pg_get_kyc_status.h pg_get_kyc_status.c \ pg_get_kyc_limits.h pg_get_kyc_limits.c \ pg_account_kyc_get_status.h pg_account_kyc_get_status.c \ pg_delete_instance_private_key.h pg_delete_instance_private_key.c \ pg_purge_instance.h pg_purge_instance.c \ pg_update_instance.h pg_update_instance.c \ pg_update_deposit_confirmation_status.h pg_update_deposit_confirmation_status.c \ pg_update_instance_auth.h pg_update_instance_auth.c \ pg_inactivate_account.h pg_inactivate_account.c \ pg_activate_account.h pg_activate_account.c \ pg_insert_otp.h pg_insert_otp.c \ pg_delete_otp.h pg_delete_otp.c \ pg_update_otp.h pg_update_otp.c \ pg_select_otp.h pg_select_otp.c \ pg_select_otp_serial.h pg_select_otp_serial.c \ pg_lookup_otp_devices.h pg_lookup_otp_devices.c \ pg_select_account.h pg_select_account.c \ pg_select_accounts.h pg_select_accounts.c \ pg_delete_template.h pg_delete_template.c \ pg_insert_template.h pg_insert_template.c \ pg_update_template.h pg_update_template.c \ pg_lookup_templates.h pg_lookup_templates.c \ pg_lookup_template.h pg_lookup_template.c \ pg_lookup_all_products.h pg_lookup_all_products.c \ pg_lookup_products.h pg_lookup_products.c \ pg_lookup_product.h pg_lookup_product.c \ pg_delete_product.h pg_delete_product.c \ pg_insert_product.h pg_insert_product.c \ pg_update_product.h pg_update_product.c \ pg_lock_product.h pg_lock_product.c \ pg_insert_exchange_keys.h pg_insert_exchange_keys.c \ pg_select_exchange_keys.h pg_select_exchange_keys.c \ pg_expire_locks.h pg_expire_locks.c \ pg_delete_order.h pg_delete_order.c \ pg_lookup_order.h pg_lookup_order.c \ pg_lookup_order_summary.h pg_lookup_order_summary.c \ pg_lookup_orders.h pg_lookup_orders.c \ pg_insert_order.h pg_insert_order.c \ pg_unlock_inventory.h pg_unlock_inventory.c \ pg_insert_order_lock.h pg_insert_order_lock.c \ pg_lookup_contract_terms3.h pg_lookup_contract_terms3.c \ pg_lookup_contract_terms2.h pg_lookup_contract_terms2.c \ pg_lookup_contract_terms.h pg_lookup_contract_terms.c \ pg_insert_contract_terms.h pg_insert_contract_terms.c \ pg_update_contract_terms.h pg_update_contract_terms.c \ pg_delete_contract_terms.h pg_delete_contract_terms.c \ pg_lookup_deposits.h pg_lookup_deposits.c \ pg_insert_exchange_signkey.h pg_insert_exchange_signkey.c \ pg_insert_deposit.h pg_insert_deposit.c \ pg_insert_deposit_confirmation.h pg_insert_deposit_confirmation.c \ pg_lookup_refunds.h pg_lookup_refunds.c \ pg_mark_contract_paid.h pg_mark_contract_paid.c \ pg_refund_coin.h pg_refund_coin.c \ pg_lookup_order_status.h pg_lookup_order_status.c \ pg_lookup_order_status_by_serial.h pg_lookup_order_status_by_serial.c \ pg_lookup_deposits_by_order.h pg_lookup_deposits_by_order.c \ pg_lookup_transfer_details_by_order.h pg_lookup_transfer_details_by_order.c \ pg_mark_order_wired.h pg_mark_order_wired.c \ pg_lookup_refunds_detailed.h pg_lookup_refunds_detailed.c \ pg_insert_refund_proof.h pg_insert_refund_proof.c \ pg_lookup_refund_proof.h pg_lookup_refund_proof.c \ pg_lookup_order_by_fulfillment.h pg_lookup_order_by_fulfillment.c \ pg_delete_transfer.h pg_delete_transfer.c \ pg_check_transfer_exists.h pg_check_transfer_exists.c \ pg_lookup_account.h pg_lookup_account.c \ pg_lookup_wire_fee.h pg_lookup_wire_fee.c \ pg_lookup_deposits_by_contract_and_coin.h pg_lookup_deposits_by_contract_and_coin.c \ pg_lookup_transfer.h pg_lookup_transfer.c \ pg_lookup_transfer_summary.h pg_lookup_transfer_summary.c \ pg_lookup_transfer_details.h pg_lookup_transfer_details.c \ pg_lookup_webhooks.h pg_lookup_webhooks.c \ pg_lookup_webhook.h pg_lookup_webhook.c \ pg_delete_webhook.h pg_delete_webhook.c \ pg_insert_webhook.h pg_insert_webhook.c \ pg_update_webhook.h pg_update_webhook.c \ pg_lookup_webhook_by_event.h pg_lookup_webhook_by_event.c \ pg_delete_pending_webhook.h pg_delete_pending_webhook.c \ pg_insert_pending_webhook.h pg_insert_pending_webhook.c \ pg_update_pending_webhook.h pg_update_pending_webhook.c \ pg_lookup_pending_webhooks.h pg_lookup_pending_webhooks.c \ pg_insert_token_family.h pg_insert_token_family.c \ pg_lookup_token_family.h pg_lookup_token_family.c \ pg_lookup_token_families.h pg_lookup_token_families.c \ pg_delete_token_family.h pg_delete_token_family.c \ pg_update_token_family.h pg_update_token_family.c \ pg_insert_token_family_key.h pg_insert_token_family_key.c \ pg_lookup_token_family_key.h pg_lookup_token_family_key.c \ pg_insert_spent_token.h pg_insert_spent_token.c \ pg_insert_issued_token.h pg_insert_issued_token.c \ pg_lookup_spent_tokens_by_order.h pg_lookup_spent_tokens_by_order.c \ plugin_merchantdb_postgres.c \ pg_helper.h pg_helper.c libtaler_plugin_merchantdb_postgres_la_LIBADD = \ $(LTLIBINTL) libtaler_plugin_merchantdb_postgres_la_LDFLAGS = \ $(TALER_PLUGIN_LDFLAGS) \ -ltalerexchange \ -ltalerpq \ -ltalerutil \ -ltalerjson \ -ltalermhd \ -lgnunetpq \ -lgnunetjson \ -lpq \ -lgnunetutil \ $(XLIB) if HAVE_POSTGRESQL if HAVE_GNUNETPQ check_PROGRAMS = \ test-merchantdb-postgres endif endif test_merchantdb_postgres_SOURCES = \ test_merchantdb.c test_merchantdb_postgres_LDFLAGS = \ -ltalerutil \ -ltalerjson \ -lgnunetjson \ -lgnunetutil \ -ljansson \ $(XLIB) test_merchantdb_postgres_LDADD = \ $(top_builddir)/src/util/libtalermerchantutil.la \ $(top_builddir)/src/backenddb/libtalermerchantdb.la TESTS = \ test-merchantdb-postgres EXTRA_DIST = \ test-merchantdb-postgres.conf \ merchantdb-postgres.conf \ $(sqlinputs) \ $(sql_DATA)