blob: 5e687c09accc1edff294afde7e154e32a026f607 [file] [log] [blame]
Willy Tarreau45cb4fb2009-10-26 21:10:04 +01001EBTREE_DIR = ../../ebtree
Willy Tarreau0b9da8d2010-01-02 12:23:30 +01002INCLUDE = -I../../include -I$(EBTREE_DIR)
Willy Tarreau6ee71752011-09-16 15:00:48 +02003
4CC = gcc
Willy Tarreaude5dc052012-06-09 09:44:03 +02005
6# note: it is recommended to also add -fomit-frame-pointer on i386
Willy Tarreaudb40a1c2009-11-17 10:08:17 +01007OPTIMIZE = -O3
Willy Tarreau72c28532009-01-22 18:56:50 +01008
Willy Tarreau419a5982012-06-12 08:52:22 +02009# most recent glibc provide platform-specific optimizations that make
10# memchr faster than the generic C implementation (eg: SSE and prefetch
11# on x86_64). Try with an without. In general, on x86_64 it's better to
12# use memchr using the define below.
13# DEFINE = -DUSE_MEMCHR
14DEFINE =
15
Willy Tarreaude5dc052012-06-09 09:44:03 +020016OBJS = halog
Willy Tarreau214c2032009-02-20 11:02:32 +010017
18halog: halog.c fgets2.c
Willy Tarreau419a5982012-06-12 08:52:22 +020019 $(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 $^
Willy Tarreau72c28532009-01-22 18:56:50 +010020
Willy Tarreau72c28532009-01-22 18:56:50 +010021clean:
Willy Tarreau8ad41932012-06-12 07:59:16 +020022 rm -f $(OBJS) *.[oas]