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 | 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 | 419a598 | 2012-06-12 08:52:22 +0200 | [diff] [blame] | 19 | $(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 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] |