From a9f16c649560f257f3466ce75d6794ce648d39a2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 2 Apr 2021 14:46:21 +0200 Subject: [PATCH] BUILD: makefile: build halog with the correct flags halog currently emits lots of warnings because it does not benefit from the default flags. Let's update the main makefile to build it by itself and remove the other one. The sub-project's makefile was replaced with A readme indicating how to build it. --- Makefile | 4 ++-- admin/halog/Makefile | 22 ---------------------- admin/halog/README | 4 ++++ 3 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 admin/halog/Makefile create mode 100644 admin/halog/README diff --git a/Makefile b/Makefile index 29d75fe18..327dbc1f7 100644 --- a/Makefile +++ b/Makefile @@ -926,8 +926,8 @@ objsize: haproxy %.o: %.c $(DEP) $(cmd_CC) $(COPTS) -c -o $@ $< -admin/halog/halog: - $(Q)$(MAKE) -C admin/halog halog CC='$(cmd_CC)' OPTIMIZE='$(COPTS)' +admin/halog/halog: admin/halog/halog.o admin/halog/fgets2.o src/ebtree.o src/eb32tree.o src/eb64tree.o src/ebmbtree.o src/ebsttree.o src/ebistree.o src/ebimtree.o + $(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS) dev/flags/flags: dev/flags/flags.o $(cmd_LD) $(LDFLAGS) -o $@ $^ $(LDOPTS) diff --git a/admin/halog/Makefile b/admin/halog/Makefile deleted file mode 100644 index bf67c1f13..000000000 --- a/admin/halog/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDE = -I../../include -SRC = ../../src - -CC = gcc - -# note: it is recommended to also add -fomit-frame-pointer on i386 -OPTIMIZE = -O3 - -# most recent glibc provide platform-specific optimizations that make -# memchr faster than the generic C implementation (eg: SSE and prefetch -# on x86_64). Try with an without. In general, on x86_64 it's better to -# use memchr using the define below. -# DEFINE = -DUSE_MEMCHR -DEFINE = - -OBJS = halog - -halog: halog.c fgets2.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] diff --git a/admin/halog/README b/admin/halog/README new file mode 100644 index 000000000..ff1bb1250 --- /dev/null +++ b/admin/halog/README @@ -0,0 +1,4 @@ +This needs to be built from the top makefile, for example : + + make admin/halog/halog + -- 2.47.3