Neels Hofmeyr | cd7fa45 | 2017-10-25 01:13:09 +0200 | [diff] [blame] | 1 | AM_CFLAGS = \ |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 2 | $(all_includes) \ |
Neels Hofmeyr | 2f75803 | 2019-11-20 00:37:07 +0100 | [diff] [blame] | 3 | -I$(top_srcdir)/include \ |
| 4 | -I$(top_builddir)/include \ |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 5 | -Wall \ |
| 6 | -ggdb3 \ |
| 7 | $(LIBOSMOCORE_CFLAGS) \ |
| 8 | $(LIBOSMOGSM_CFLAGS) \ |
Neels Hofmeyr | ba1605a | 2018-01-16 13:35:46 +0100 | [diff] [blame] | 9 | $(LIBOSMOABIS_CFLAGS) \ |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 10 | $(SQLITE3_CFLAGS) \ |
| 11 | $(NULL) |
| 12 | |
Oliver Smith | 3cf87fe | 2019-03-19 13:46:08 +0100 | [diff] [blame] | 13 | AM_LDFLAGS = \ |
| 14 | -no-install \ |
| 15 | $(NULL) |
| 16 | |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 17 | EXTRA_DIST = \ |
| 18 | db_test.ok \ |
| 19 | db_test.err \ |
| 20 | $(NULL) |
| 21 | |
| 22 | check_PROGRAMS = db_test |
| 23 | |
| 24 | db_test_SOURCES = \ |
| 25 | db_test.c \ |
| 26 | $(NULL) |
| 27 | |
| 28 | db_test_LDADD = \ |
Vadim Yanitskiy | 3764217 | 2019-07-26 18:10:23 +0700 | [diff] [blame] | 29 | $(top_builddir)/src/logging.o \ |
| 30 | $(top_builddir)/src/db_auc.o \ |
| 31 | $(top_builddir)/src/db_hlr.o \ |
| 32 | $(top_builddir)/src/db.o \ |
Neels Hofmeyr | c79bcde | 2019-12-04 01:04:32 +0100 | [diff] [blame^] | 33 | $(top_builddir)/src/cni_peer_id.o \ |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 34 | $(LIBOSMOCORE_LIBS) \ |
| 35 | $(LIBOSMOGSM_LIBS) \ |
Neels Hofmeyr | ba1605a | 2018-01-16 13:35:46 +0100 | [diff] [blame] | 36 | $(LIBOSMOABIS_LIBS) \ |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 37 | $(SQLITE3_LIBS) \ |
| 38 | $(NULL) |
| 39 | |
Vadim Yanitskiy | fbd736e | 2018-07-31 22:40:30 +0700 | [diff] [blame] | 40 | if DB_SQLITE_DEBUG |
| 41 | db_test_LDADD += $(top_builddir)/src/db_debug.o |
| 42 | endif |
| 43 | |
Neels Hofmeyr | 9850946 | 2017-10-09 17:28:53 +0200 | [diff] [blame] | 44 | .PHONY: db_test.db update_exp manual manual-nonverbose manual-gdb |
| 45 | db_test.db: |
| 46 | rm -f db_test.db |
| 47 | sqlite3 $(builddir)/db_test.db < $(top_srcdir)/sql/hlr.sql |
| 48 | |
| 49 | update_exp: db_test.db |
| 50 | cd $(builddir); ./db_test >"$(srcdir)/db_test.ok" 2>"$(srcdir)/db_test.err" |
| 51 | |
| 52 | manual: db_test.db |
| 53 | cd $(builddir); ./db_test -v |
| 54 | |
| 55 | manual-nonverbose: db_test.db |
| 56 | cd $(builddir); ./db_test |
| 57 | |
| 58 | manual-gdb: db_test.db |
| 59 | cd $(builddir); gdb -ex run --args ./db_test -v |