nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 4c4335fcd0f349916a880990cea59692827302ad
parent 2e3f2193c4ea7ae55afb8bcaecfc58440d4d6b06
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 22 Dec 2023 13:16:28 -0800

improve compile times

Diffstat:
M.gitignore | 1+
MMakefile | 8+++-----
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -8,6 +8,7 @@ test .build-result *.dSYM *.zst +*.o testdata/many-events.json testdata/db/ndb-v0.tar testdata/db/v0 diff --git a/Makefile b/Makefile @@ -2,8 +2,9 @@ CFLAGS = -Wall -Wno-misleading-indentation -Wno-unused-function -Werror -O2 -g - HEADERS = sha256.h nostrdb.h cursor.h hex.h jsmn.h config.h sha256.h random.h memchr.h cpu.h $(C_BINDINGS) FLATCC_SRCS=deps/flatcc/src/runtime/json_parser.c deps/flatcc/src/runtime/verifier.c deps/flatcc/src/runtime/builder.c deps/flatcc/src/runtime/emitter.c deps/flatcc/src/runtime/refmap.c SRCS = nostrdb.c sha256.c bech32.c $(FLATCC_SRCS) -LDS = $(SRCS) $(ARS) -DEPS = $(SRCS) $(HEADERS) $(ARS) +LDS = $(OBJS) $(ARS) +OBJS = $(SRCS:.c=.o) +DEPS = $(OBJS) $(HEADERS) $(ARS) ARS = deps/lmdb/liblmdb.a deps/secp256k1/.libs/libsecp256k1.a LMDB_VER=0.9.31 FLATCC_VER=05dc16dc2b0316e61063bb1fc75426647badce48 @@ -163,7 +164,4 @@ testdata/db/.dir: test: test.c $(DEPS) testdata/db/.dir $(CC) $(CFLAGS) test.c $(LDS) -o $@ -%.o: %.c - $(CC) $(CFLAGS) - .PHONY: tags clean