summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: 3b09b7b8802dc1a811a5d1ad7d68678d1e04a0ee (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
AM_CFLAGS = \
	-Wall \
	$(LIBOSMOCORE_CFLAGS) \
	$(LIBOSMOGSM_CFLAGS) \
	$(LIBOSMOVTY_CFLAGS) \
	$(LIBOSMOCTRL_CFLAGS) \
	$(LIBOSMOABIS_CFLAGS) \
	$(SQLITE3_CFLAGS) \
	$(NULL)

EXTRA_DIST = \
	populate_hlr_db.pl \
	db_bootstrap.sed \
	$(NULL)

BUILT_SOURCES = \
	db_bootstrap.h \
	$(NULL)
CLEANFILES = $(BUILT_SOURCES)

noinst_HEADERS = \
	auc.h \
	db.h \
	hlr.h \
	luop.h \
	gsup_router.h \
	gsup_server.h \
	logging.h \
	rand.h \
	ctrl.h \
	hlr_vty.h \
	hlr_vty_subscr.h \
	db_bootstrap.h \
	$(NULL)

bin_PROGRAMS = \
	osmo-hlr \
	$(NULL)

noinst_PROGRAMS = \
	db_test \
	$(NULL)

osmo_hlr_SOURCES = \
	auc.c \
	ctrl.c \
	db.c \
	luop.c \
	db_auc.c \
	db_hlr.c \
	gsup_router.c \
	gsup_server.c \
	hlr.c \
	logging.c \
	rand_urandom.c \
	hlr_vty.c \
	hlr_vty_subscr.c \
	$(NULL)

osmo_hlr_LDADD = \
	$(LIBOSMOCORE_LIBS) \
	$(LIBOSMOGSM_LIBS) \
	$(LIBOSMOVTY_LIBS) \
	$(LIBOSMOCTRL_LIBS) \
	$(LIBOSMOABIS_LIBS) \
	$(SQLITE3_LIBS) \
	$(NULL)

db_test_SOURCES = \
	auc.c \
	db.c \
	db_auc.c \
	db_test.c \
	logging.c \
	rand_fake.c \
	$(NULL)

db_test_LDADD = \
	$(LIBOSMOCORE_LIBS) \
	$(LIBOSMOGSM_LIBS) \
	$(SQLITE3_LIBS) \
	$(NULL)

BOOTSTRAP_SQL = $(top_srcdir)/sql/hlr.sql

db_bootstrap.h: $(BOOTSTRAP_SQL) $(srcdir)/db_bootstrap.sed
	echo "/* DO NOT EDIT THIS FILE. It is generated from osmo-hlr.git/sql/hlr.sql */" > "$@"
	echo "#pragma once" >> "$@"
	echo "static const char *stmt_bootstrap_sql[] = {" >> "$@"
	cat "$(BOOTSTRAP_SQL)" \
		| sed -f "$(srcdir)/db_bootstrap.sed" \
		>> "$@"
	echo "};" >> "$@"