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.
This commit is contained in:
Willy Tarreau 2021-04-02 14:46:21 +02:00
parent c4710e14fe
commit a9f16c6495
3 changed files with 6 additions and 24 deletions

View File

@ -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)

View File

@ -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]

4
admin/halog/README Normal file
View File

@ -0,0 +1,4 @@
This needs to be built from the top makefile, for example :
make admin/halog/halog