]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: haload: add haload build target
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 19 Mar 2026 16:55:36 +0000 (17:55 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 24 Apr 2026 09:32:45 +0000 (11:32 +0200)
This patch introduces the haload target to the Makefile. It defines
the HALOAD_OBJS list, which includes the standard objects along with
the specific haload_init.o, haload.o, and hbuf.o files.

The build process follows the same pattern as the haterm tool,
allowing haload to be compiled as a standalone binary.

Makefile

index 8bde128285be5f019a7b89ba85671066871f13d3..caf1b8f370d022196850bc22ce515c491e6d892e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -967,6 +967,7 @@ endif # TARGET
 
 OBJS =
 HATERM_OBJS =
+HALOAD_OBJS =
 
 ifneq ($(EXTRA_OBJS),)
   OBJS += $(EXTRA_OBJS)
@@ -1022,6 +1023,8 @@ endif
 
 HATERM_OBJS += $(OBJS) src/haterm_init.o src/hbuf.o
 
+HALOAD_OBJS += $(OBJS) src/haload_init.o src/haload.o src/hbuf.o
+
 # Used only for forced dependency checking. May be cleared during development.
 INCLUDES = $(wildcard include/*/*.h)
 DEP = $(INCLUDES) .build_opts
@@ -1072,6 +1075,9 @@ haproxy: $(OPTIONS_OBJS) $(OBJS)
 haterm: $(OPTIONS_OBJS) $(HATERM_OBJS)
        $(cmd_LD) $(ARCH_FLAGS) $(LDFLAGS) -o $@ $^ $(LDOPTS)
 
+haload: $(OPTIONS_OBJS) $(HALOAD_OBJS)
+       $(cmd_LD) $(ARCH_FLAGS) $(LDFLAGS) -o $@ $^ $(LDOPTS)
+
 objsize: haproxy
        $(Q)objdump -t $^|grep ' g '|grep -F '.text'|awk '{print $$5 FS $$6}'|sort