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