aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-07 20:27:10 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-07 20:27:10 +0100
commitc2f77d08fb15feb5f0f5826c55fa525f3659d986 (patch)
treea2a0a86b4e845fa3e729e604b4a62cc9ec054ff3 /Makefile
parent70399f1c8cae6e9ddd43cd28ecdaf17c96274c65 (diff)
Add the option of configuring the BPT key and bitmask sizes.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 53892cd..26af52a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
RM_F = rm -f
-CFLAGS = -std=c99 -Wall -pedantic -ggdb -g -DUSE_TERMIOS
+ADDITIONAL_CFLAGS = -DCHUNK_LENGTH=6 -DKEY_LENGTH=64 -DOFFSET_MASK=63 -DMAX_CHUNKS=11 -DLAST_CHUNK_LENGTH=4 -DBPT_EXPLICIT_CONFIGURATION -DBPT_KEY_T=intptr_t -DBPT_KEY_BITMASK_T=int64_t
+CFLAGS = -std=c99 -Wall -pedantic -ggdb -g -DUSE_TERMIOS $(ADDITIONAL_CFLAGS)
LIBTOOL = libtool
LDFLAGS = -lc
CC = clang
@@ -15,6 +16,10 @@ bpttest_C_SOURCES = bpt_test.c
bpttest_OBJECTS = $(patsubst %.c,%.o,$(bpttest_C_SOURCES))
bpttest_TARGET = bpt_test
+config_C_SOURCES = config.c
+config_OBJECTS = $(patsubst %.c,%.o,$(config_C_SOURCES))
+config_TARGET = config
+
.PHONY: all clean
all: $(mulklib_TARGET) $(bpttest_TARGET)
@@ -24,6 +29,8 @@ clean:
$(RM_F) $(mulklib_TARGET)
$(RM_F) $(bpttest_OBJECTS)
$(RM_F) $(bpttest_TARGET)
+ $(RM_F) $(config_OBJECTS)
+ $(RM_F) $(config_TARGET)
$(mulklib_TARGET): $(mulklib_OBJECTS)
@@ -32,5 +39,9 @@ $(mulklib_TARGET): $(mulklib_OBJECTS)
$(bpttest_TARGET): $(bpttest_OBJECTS) $(mulklib_TARGET)
$(CC) -o $@ $+
+$(config_TARGET): $(config_OBJECTS)
+ $(CC) -o $@ $+
+
bitmapped_patricia_tree.o: bitmapped_patricia_tree.c bitmapped_patricia_tree.h
bpt_test.o: bpt_test.c bitmapped_patricia_tree.h
+config.o: config.c