]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: build halog with the correct flags
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 12:46:21 +0000 (14:46 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 15:48:42 +0000 (17:48 +0200)
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
admin/halog/Makefile [deleted file]
admin/halog/README [new file with mode: 0644]

index 29d75fe1873cbe1a826d46d0ca1196c211f2234b..327dbc1f7e6d2ba1d0ec99f1092eed55861264f7 100644 (file)
--- 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 (file)
index bf67c1f..0000000
+++ /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 (file)
index 0000000..ff1bb12
--- /dev/null
@@ -0,0 +1,4 @@
+This needs to be built from the top makefile, for example :
+
+  make admin/halog/halog
+