Willy Tarreau | 45cb4fb | 2009-10-26 21:10:04 +0100 | [diff] [blame] | 1 | EBTREE_DIR = ../../ebtree |
Willy Tarreau | 0b9da8d | 2010-01-02 12:23:30 +0100 | [diff] [blame] | 2 | INCLUDE = -I../../include -I$(EBTREE_DIR) |
Willy Tarreau | ff0e8a4 | 2020-05-27 10:43:24 +0200 | [diff] [blame^] | 3 | SRC = ../../src |
Willy Tarreau | 6ee7175 | 2011-09-16 15:00:48 +0200 | [diff] [blame] | 4 | |
| 5 | CC = gcc |
Willy Tarreau | de5dc05 | 2012-06-09 09:44:03 +0200 | [diff] [blame] | 6 | |
| 7 | # note: it is recommended to also add -fomit-frame-pointer on i386 |
Willy Tarreau | db40a1c | 2009-11-17 10:08:17 +0100 | [diff] [blame] | 8 | OPTIMIZE = -O3 |
Willy Tarreau | 72c2853 | 2009-01-22 18:56:50 +0100 | [diff] [blame] | 9 | |
Willy Tarreau | 419a598 | 2012-06-12 08:52:22 +0200 | [diff] [blame] | 10 | # 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 |
| 15 | DEFINE = |
| 16 | |
Willy Tarreau | de5dc05 | 2012-06-09 09:44:03 +0200 | [diff] [blame] | 17 | OBJS = halog |
Willy Tarreau | 214c203 | 2009-02-20 11:02:32 +0100 | [diff] [blame] | 18 | |
| 19 | halog: halog.c fgets2.c |
Willy Tarreau | ff0e8a4 | 2020-05-27 10:43:24 +0200 | [diff] [blame^] | 20 | $(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 Tarreau | 72c2853 | 2009-01-22 18:56:50 +0100 | [diff] [blame] | 21 | |
Willy Tarreau | 72c2853 | 2009-01-22 18:56:50 +0100 | [diff] [blame] | 22 | clean: |
Willy Tarreau | 8ad4193 | 2012-06-12 07:59:16 +0200 | [diff] [blame] | 23 | rm -f $(OBJS) *.[oas] |