summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Sowden <azazel@debian.org>2025-01-15 18:33:11 +0000
committerSimon Horman <horms@kernel.org>2025-01-18 08:45:53 +0000
commit3c9cdaef82165cb94bc6762be898b42f6fd1e83d (patch)
treec65305949291a7aacb025898ad82d9b36c422953
parent98d83badc6d77a7bc33685c602435e0100c607f6 (diff)
Make sure libipvs.a is built before ipvsadmHEADorigin/masterorigin/mainorigin/HEADmaster
There is no explicit rule in the top-level Makefile to build libipvs.a. It is built by the phony target `libs`. However, there is no guarantee of the order in which the prerequisites of the `all` target are built, so make may attempt to link ipvsadm to libipvs.a before it has finished building libipvs.a. Add a rule to express the dependency of `$(STATIC_LIBS)` on `libs`. Signed-off-by: Jeremy Sowden <azazel@debian.org> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@kernel.org>
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d79f724..2dda190 100644
--- a/Makefile
+++ b/Makefile
@@ -90,6 +90,8 @@ libs:
ipvsadm: $(OBJS) $(STATIC_LIBS)
$(CC) $(DEFAULT_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+$(STATIC_LIBS): libs
+
install: all
if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
$(INSTALL) -m 0755 ipvsadm $(SBIN)