summaryrefslogtreecommitdiffstats
path: root/tests/db/Makefile.am
blob: b706bec8abdc411f5790f22220c23bb49cc74d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AM_CFLAGS = \
	$(all_includes) \
	-I$(top_srcdir)/src \
	-Wall \
	-ggdb3 \
	$(LIBOSMOCORE_CFLAGS) \
	$(LIBOSMOGSM_CFLAGS) \
	$(SQLITE3_CFLAGS) \
	$(NULL)

EXTRA_DIST = \
	db_test.ok \
	db_test.err \
	$(NULL)

check_PROGRAMS = db_test

db_test_SOURCES = \
	db_test.c \
	$(NULL)

db_test_LDADD = \
	$(top_srcdir)/src/db.c \
	$(top_srcdir)/src/db_hlr.c \
	$(top_srcdir)/src/db_auc.c \
	$(top_srcdir)/src/logging.c \
	$(LIBOSMOCORE_LIBS) \
	$(LIBOSMOGSM_LIBS) \
	$(SQLITE3_LIBS) \
	$(NULL)

.PHONY: db_test.db update_exp manual manual-nonverbose manual-gdb
db_test.db:
	rm -f db_test.db
	sqlite3 $(builddir)/db_test.db < $(top_srcdir)/sql/hlr.sql

update_exp: db_test.db
	cd $(builddir); ./db_test >"$(srcdir)/db_test.ok" 2>"$(srcdir)/db_test.err"

manual: db_test.db
	cd $(builddir); ./db_test -v

manual-nonverbose: db_test.db
	cd $(builddir); ./db_test

manual-gdb: db_test.db
	cd $(builddir); gdb -ex run --args ./db_test -v