From 51108f839ddc7cbc6593336fb4f07bc9191472e8 Mon Sep 17 00:00:00 2001 From: Kai Krakow Date: Sun, 4 Feb 2018 15:55:30 +0100 Subject: [PATCH] Makefile: Due to VPATH, libcrucible links to hard-coded libuuid path Due to VPATH and how make resolves source paths, libcrucible.so ends up with a hard-coded path to link against libuuid.so. Let's fix it by turning the general rule into an explicit rule for libcrucible.so. Signed-off-by: Kai Krakow --- lib/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 57e0cb9..c0881a1 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -19,8 +19,6 @@ CRUCIBLE_OBJS = \ time.o \ uuid.o \ -libcrucible.so: $(CRUCIBLE_OBJS) .version.o -luuid - include ../makeflags include ../Defines.mk @@ -44,5 +42,5 @@ include depends.mk %.o: %.cc ../makeflags $(CXX) $(CXXFLAGS) -fPIC -o $@ -c $< -%.so: - $(CXX) $(LDFLAGS) -fPIC -shared -Wl,-soname,$@ -o $@ $^ +libcrucible.so: $(CRUCIBLE_OBJS) .version.o + $(CXX) $(LDFLAGS) -fPIC -shared -Wl,-soname,$@ -o $@ $^ -luuid