REORG: ebtree: move the C files from ebtree/ to src/

As part of the include files cleanup, we're going to kill the ebtree
directory. For this we need to host its C files in a different location
and src/ is the right one.
This commit is contained in:
Willy Tarreau 2020-05-27 10:43:24 +02:00
parent f38175cf6e
commit ff0e8a44a4
11 changed files with 6 additions and 14 deletions

View File

@ -814,13 +814,10 @@ OBJS = src/mux_h2.o src/stream.o src/mux_fcgi.o src/cfgparse-listen.o \
src/pipe.o src/shctx.o src/hpack-tbl.o src/http_acl.o src/sha1.o \
src/time.o src/hpack-enc.o src/fcgi.o src/arg.o src/base64.o \
src/protocol.o src/freq_ctr.o src/lru.o src/hpack-huff.o src/dict.o \
src/eb32sctree.o src/eb32tree.o src/eb64tree.o src/ebmbtree.o \
src/ebsttree.o src/ebimtree.o src/ebistree.o src/ebtree.o \
src/hash.o src/mailers.o src/version.o
EBTREE_OBJS = $(EBTREE_DIR)/ebtree.o $(EBTREE_DIR)/eb32sctree.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
ifneq ($(TRACE),)
OBJS += src/calltrace.o
endif
@ -829,9 +826,6 @@ ifneq ($(EXTRA_OBJS),)
OBJS += $(EXTRA_OBJS)
endif
# Not used right now
LIB_EBTREE = $(EBTREE_DIR)/libebtree.a
# Used only for forced dependency checking. May be cleared during development.
INCLUDES = $(wildcard include/*/*.h ebtree/*.h)
DEP = $(INCLUDES) .build_opts
@ -864,12 +858,9 @@ else
.build_opts:
endif
haproxy: $(OPTIONS_OBJS) $(OBJS) $(EBTREE_OBJS)
haproxy: $(OPTIONS_OBJS) $(OBJS)
$(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS)
$(LIB_EBTREE): $(EBTREE_OBJS)
$(cmd_AR) rv $@ $^
objsize: haproxy
$(Q)objdump -t $^|grep ' g '|grep -F '.text'|awk '{print $$5 FS $$6}'|sort
@ -927,7 +918,7 @@ uninstall:
$(Q)rm -f "$(DESTDIR)$(SBINDIR)"/haproxy
clean:
$(Q)rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test .build_opts .build_opts.new
$(Q)rm -f *.[oas] src/*.[oas] haproxy test .build_opts .build_opts.new
$(Q)for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done
$(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS).tar.gz
$(Q)rm -f haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS) nohup.out gmon.out

View File

@ -1,5 +1,6 @@
EBTREE_DIR = ../../ebtree
INCLUDE = -I../../include -I$(EBTREE_DIR)
SRC = ../../src
CC = gcc
@ -16,7 +17,7 @@ DEFINE =
OBJS = halog
halog: halog.c fgets2.c
$(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 $^
$(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 $^
clean:
rm -f $(OBJS) *.[oas]