From: наб <nabijaczleweli@nabijaczleweli.xyz>
Date: Sun, 24 Aug 2025 01:17:59 +0200
Subject: make --shuffle=reverse (Closes: #1105333)

---
 lib/Makefile   | 2 ++
 tools/Makefile | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/Makefile b/lib/Makefile
index c4126f4..ba687fb 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -149,8 +149,10 @@ $(libname).a: __$(libname).o
 $(libname).so:  $(libname).so.$(libversion)
 	ln -sf $< $@
 
+ifneq "$(MAJOR_VERS)" "$(libversion)"
 $(libname).so.$(MAJOR_VERS): $(libname).so.$(libversion)
 	ln -sf $< $@
+endif
 
 $(libname).so.$(libversion): __$(libname).o
 	$(CC) $(LDFLAGS) -shared -Wl,-soname,$(libname).so.$(MAJOR_VERS) \
diff --git a/tools/Makefile b/tools/Makefile
index 834b8d4..0949bc9 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -64,9 +64,6 @@ endif # WITH_LIBCXL
 
 all: $(projs)
 
-genwqe_memcopy: force_cpu.o
-genwqe_vpdconv genwqe_vpdupdate: genwqe_vpd_common.o
-
 $(projs): $(libs)
 
 objs = force_cpu.o genwqe_vpd_common.o $(projs:=.o)
@@ -174,3 +171,5 @@ uninstall: uninstall_gzip_tools uninstall_manpages
 clean distclean:
 	$(RM) $(objs) $(projs) $(manpages)
 
+.SECONDEXPANSION:
+$(projs): $$($$@_objs)
