Makefile: don't bake DESTDIR into libyosys DT_SONAME
authorXiretza <xiretza@xiretza.xyz>
Mon, 14 Jun 2021 09:35:38 +0000 (11:35 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Mon, 5 Jul 2021 14:39:16 +0000 (16:39 +0200)
DESTDIR is only used as a temporary destination for installed files
before they are packaged into an archive; the "real" installed location
is determined by PREFIX/{BIN,LIB,DAT}DIR.

Makefile

index 77c4486877eb5cf1c7d1c8bae56ff5bc176ffe9b..aaf0398cc513eaba33d6c6c28433f39933a34ba8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -676,9 +676,9 @@ $(PROGRAM_PREFIX)yosys$(EXE): $(OBJS)
 
 libyosys.so: $(filter-out kernel/driver.o,$(OBJS))
 ifeq ($(OS), Darwin)
-       $(P) $(LD) -o libyosys.so -shared -Wl,-install_name,$(DESTDIR)$(LIBDIR)/libyosys.so $(LDFLAGS) $^ $(LDLIBS)
+       $(P) $(LD) -o libyosys.so -shared -Wl,-install_name,$(LIBDIR)/libyosys.so $(LDFLAGS) $^ $(LDLIBS)
 else
-       $(P) $(LD) -o libyosys.so -shared -Wl,-soname,$(DESTDIR)$(LIBDIR)/libyosys.so $(LDFLAGS) $^ $(LDLIBS)
+       $(P) $(LD) -o libyosys.so -shared -Wl,-soname,$(LIBDIR)/libyosys.so $(LDFLAGS) $^ $(LDLIBS)
 endif
 
 %.o: %.cc