blob: 319942d11c393c3e586fcdfa302360a062c41fdd [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 Tarreauff0e8a42020-05-27 10:43:24 +02003SRC = ../../src
Willy Tarreau6ee71752011-09-16 15:00:48 +02004
5CC = gcc
Willy Tarreaude5dc052012-06-09 09:44:03 +02006
7# note: it is recommended to also add -fomit-frame-pointer on i386
Willy Tarreaudb40a1c2009-11-17 10:08:17 +01008OPTIMIZE = -O3
Willy Tarreau72c28532009-01-22 18:56:50 +01009
Willy Tarreau419a5982012-06-12 08:52:22 +020010# most recent glibc provide platform-specific optimizations that make
11# memchr faster than the generic C implementation (eg: SSE and prefetch
12# on x86_64). Try with an without. In general, on x86_64 it's better to
13# use memchr using the define below.
14# DEFINE = -DUSE_MEMCHR
15DEFINE =
16
Willy Tarreaude5dc052012-06-09 09:44:03 +020017OBJS = halog
Willy Tarreau214c2032009-02-20 11:02:32 +010018
19halog: halog.c fgets2.c
Willy Tarreauff0e8a42020-05-27 10:43:24 +020020 $(CC) $(OPTIMIZE) $(DEFINE) -o $@ $(INCLUDE) $(SRC)/ebtree.c $(SRC)/eb32tree.c $(SRC)/eb64tree.c $(SRC)/ebmbtree.c $(SRC)/ebsttree.c $(SRC)/ebistree.c $(SRC)/ebimtree.c $^
Willy Tarreau72c28532009-01-22 18:56:50 +010021
Willy Tarreau72c28532009-01-22 18:56:50 +010022clean:
Willy Tarreau8ad41932012-06-12 07:59:16 +020023 rm -f $(OBJS) *.[oas]