summaryrefslogtreecommitdiff
path: root/utils/Makefile
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2011-07-06 20:58:12 +0000
committerTerry Wilson <twilson@digium.com>2011-07-06 20:58:12 +0000
commitefd040cd11cff99a9dccf54c030a134d9a1e2e07 (patch)
treeb4a3f36ffe91a5226485088c3bb2c5c6ac698fa1 /utils/Makefile
parenta7c6f0445e7bbd1f7aea1687eae52c3ca7cd5756 (diff)
Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk used. Instead of spending the time tracking down the bugs in the Berkeley code we move to the much better documented SQLite 3. Conversion of the old astdb happens at runtime by running the included astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave identically to the old Berkeley backend, but in the future we could offer a much more robust interface. We do not include the SQLite 3 library in the source tree, but instead rely upon the distribution-provided libraries. SQLite is so ubiquitous that this should not place undue burden on administrators. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils/Makefile')
-rw-r--r--utils/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 1981fb2e2..d80a488d9 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -89,6 +89,8 @@ clean:
rm -f md5.c strcompat.c ast_expr2.c ast_expr2.h ast_expr2f.c pbx_ael.c pval.c hashtab.c lock.c
rm -f aelparse.c aelbison.c conf2ael
rm -f utils.c strings.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
+ rm -f db1-ast/.*.d
+ @$(MAKE) -C db1-ast clean
md5.c: $(ASTTOPDIR)/main/md5.c
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
@@ -206,6 +208,14 @@ muted: muted.o
muted: LIBS+=$(AUDIO_LIBS)
muted: _ASTCFLAGS:=$(filter-out -Werror,$(_ASTCFLAGS))
+CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/
+db1-ast/libdb1.a: CHECK_SUBDIR
+ _ASTCFLAGS="$(_ASTCFLAGS) -Wno-strict-aliasing" ASTCFLAGS="$(ASTCFLAGS)" $(MAKE) -C db1-ast libdb1.a
+
+astdb2sqlite3: LIBS+=$(SQLITE3_LIB)
+astdb2sqlite3: _ASTCFLAGS+=$(SQLITE3_INCLUDE)
+astdb2sqlite3: db1-ast/libdb1.a
+
ifneq ($(wildcard .*.d),)
include .*.d
endif