2009-10-26 20:10:04 +00:00
|
|
|
EBTREE_DIR = ../../ebtree
|
2010-01-02 11:23:30 +00:00
|
|
|
INCLUDE = -I../../include -I$(EBTREE_DIR)
|
2011-09-16 13:00:48 +00:00
|
|
|
|
|
|
|
CC = gcc
|
2012-06-09 07:44:03 +00:00
|
|
|
|
|
|
|
# note: it is recommended to also add -fomit-frame-pointer on i386
|
2009-11-17 09:08:17 +00:00
|
|
|
OPTIMIZE = -O3
|
2009-01-22 17:56:50 +00:00
|
|
|
|
2012-06-12 06:52:22 +00:00
|
|
|
# most recent glibc provide platform-specific optimizations that make
|
|
|
|
# memchr faster than the generic C implementation (eg: SSE and prefetch
|
|
|
|
# on x86_64). Try with an without. In general, on x86_64 it's better to
|
|
|
|
# use memchr using the define below.
|
|
|
|
# DEFINE = -DUSE_MEMCHR
|
|
|
|
DEFINE =
|
|
|
|
|
2012-06-09 07:44:03 +00:00
|
|
|
OBJS = halog
|
2009-01-22 17:56:50 +00:00
|
|
|
|
2009-02-20 10:02:32 +00:00
|
|
|
halog: halog.c fgets2.c
|
2012-06-12 06:52:22 +00:00
|
|
|
$(CC) $(OPTIMIZE) $(DEFINE) -o $@ $(INCLUDE) $(EBTREE_DIR)/ebtree.c $(EBTREE_DIR)/eb32tree.c $(EBTREE_DIR)/eb64tree.c $(EBTREE_DIR)/ebmbtree.c $(EBTREE_DIR)/ebsttree.c $(EBTREE_DIR)/ebistree.c $(EBTREE_DIR)/ebimtree.c $^
|
2009-02-20 10:02:32 +00:00
|
|
|
|
2009-01-22 17:56:50 +00:00
|
|
|
clean:
|
2012-06-12 05:59:16 +00:00
|
|
|
rm -f $(OBJS) *.[oas]
|