commit c27be43a2700ee240460d15f1a2eef84dba48bb4
parent 3e3cd0fb01c00a021c4094d5d69688e03dc88ebc
Author: William Casarin <jb55@jb55.com>
Date: Sat, 23 Dec 2023 15:36:44 -0800
make: cleanup a bit, separate bench running
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -20,7 +20,7 @@ BIN=ndb
CHECKDATA=testdata/db/v0/data.mdb
-all: lib ndb libnostrdb.a
+all: $(BIN) lib bench
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c -o $@ $<
@@ -28,7 +28,7 @@ all: lib ndb libnostrdb.a
libnostrdb.a: $(OBJS)
ar rcs $@ $(OBJS)
-lib: benches test
+lib: libnostrdb.a
ndb: ndb.c $(DEPS)
$(CC) $(CFLAGS) ndb.c $(LDS) -o $@
@@ -43,8 +43,6 @@ check: test
clean:
rm -rf test bench bench-ingest bench-ingest-many
-benches: bench
-
distclean: clean
rm -rf deps
@@ -158,9 +156,12 @@ testdata/many-events.json.zst:
testdata/many-events.json: testdata/many-events.json.zst
zstd -d $<
-bench: bench-ingest-many.c $(DEPS) testdata/many-events.json
+bench: bench-ingest-many.c $(DEPS)
$(CC) $(CFLAGS) $< $(LDS) -o $@
+run-bench: testdata/many-events.json bench
+ ./bench
+
testdata/db/.dir:
@mkdir -p testdata/db
touch testdata/db/.dir