Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 76 lines (58 sloc) 1.612 kb
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
CC:=gcc

CFLAGS=-std=c99 -pedantic -Wall -Wextra -g -fPIC -Isrc -O3 -pthread -march=native
LIBS=-lm -lcrypto -pthread

O_FILES=src/ydb_batch.o \
src/ydb_common.o \
src/ydb_logging.o \
src/ydb_writer.o \
src/ydb_file.o \
src/ydb_db.o \
src/ydb_record.o \
src/ydb_reader.o \
src/ydb_hashdir.o \
src/ydb_hashdir_active.o \
src/ydb_hashdir_frozen.o \
src/ydb_itree.o \
src/ohamt.o \
src/ohamt_mem.o \
src/stddev.o \
src/ydb_log.o \
src/bitmap.o \
src/ydb_state.o \
src/ydb_logs.o \
src/hamt.o \
src/ydb_sys.o \
src/ydb_base.o \
src/ydb_base_aux.o \
src/ydb_base_pub.o \
src/ydb_public.o \
src/ydb_worker.o \
src/ydb_frozen_list.o

TPROGS=src_tests/test_ydb_write \
src_tests/test_ydb_read


all: libydb.a $(TPROGS) tests

libydb.a: $(O_FILES)
ar r $@ $^
ranlib $@


src_tests/test_ydb_write: src_tests/test_ydb_write.o src_tests/test_common.o libydb.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(LTEST)

src_tests/test_ydb_read: src_tests/test_ydb_read.o src_tests/test_common.o libydb.a
$(CC) $(CFLAGS) -o $@ $^ $(LIBS) $(LTEST)

# Cancel the implicit rule.
%.o: %.c

%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<

clean::
rm -f libydb.a $(TPROGS) src/*.o src_tests/*.o


tests/test-stress-gc.in:
echo "reopen 300" > $@
python ./src_tests/simple_generate.py 10000 1 1600 >> $@
rm -rf tests.mk

tests/test-overwrites.in:
echo "reopen 7" > $@
python ./src_tests/simple_generate.py 100000 1 1 >> $@
rm -rf tests.mk

tests:: tests/test-stress-gc.in tests/test-overwrites.in

tests.mk: src_tests/generate_makefile.py
python src_tests/generate_makefile.py > tests.mk

include tests.mk
Something went wrong with that request. Please try again.