[MEDIUM] build: switch ebtree users to use new ebtree version
All files referencing the previous ebtree code were changed to point
to the new one in the ebtree directory. A makefile variable (EBTREE_DIR)
is also available to use files from another directory.
The ability to build the libebtree library temporarily remains disabled
because it can have an impact on some existing toolchains and does not
appear worth it in the medium term if we add support for multi-criteria
stickiness for instance.
diff --git a/Makefile.osx b/Makefile.osx
index 19fb720..5fa0da0 100644
--- a/Makefile.osx
+++ b/Makefile.osx
@@ -31,6 +31,9 @@
PCREDIR!= pcre-config --prefix 2>/dev/null || :
#PCREDIR=/usr/local
+# This one can be changed to look for ebtree files in an external directory
+EBTREE_DIR = ebtree
+
# This is for darwin 3.0 and above
COPTS.darwin = -DENABLE_POLL -DENABLE_KQUEUE
LIBS.darwin =
@@ -89,8 +92,8 @@
VER_OPTS := -DCONFIG_HAPROXY_VERSION=\"$(VERSION)$(SUBVERS)\" \
-DCONFIG_HAPROXY_DATE=\"$(VERDATE)\"
-COPTS = -Iinclude $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) $(REGEX_OPTS) \
- $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
+COPTS = -Iinclude -I$(EBTREE_DIR) $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) \
+ $(REGEX_OPTS) $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
LIBS = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
CFLAGS = -Wall $(COPTS) $(DEBUG) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
@@ -104,13 +107,17 @@
src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \
src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \
src/ev_poll.o \
- src/acl.o src/memory.o src/freq_ctr.o \
- src/ebtree.o src/eb32tree.o
+ src/acl.o src/memory.o src/freq_ctr.o
+
+EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o \
+ $(EBTREE_DIR)/eb32tree.o $(EBTREE_DIR)/eb64tree.o \
+ $(EBTREE_DIR)/ebmbtree.o $(EBTREE_DIR)/ebsttree.o \
+ $(EBTREE_DIR)/ebimtree.o $(EBTREE_DIR)/ebistree.o
all: haproxy
-haproxy: $(OBJS)
- $(LD) $(LDFLAGS) $(OBJS) -o $@
+haproxy: $(OBJS) $(EBTREE_OBJS)
+ $(LD) $(LDFLAGS) $(OBJS) $(EBTREE_OBJS) -o $@
.SUFFIXES: .c.o
@@ -126,8 +133,8 @@
$(CC) $(CFLAGS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
clean:
- rm -f *.[oas] src/*.[oas] core haproxy test
- for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done
+ rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test
+ for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done
rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION) nohup.out gmon.out
version: