From 3db55b30082047a7a1b80c718bdb8d8e3fa85848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Sat, 8 Jan 2022 08:00:46 +0100 Subject: Allow overriding plugin installation directory Currently we install the plugin into /usr/share since this is where yosys loads from, however this violates the FHS as only architecture-independent data is supposed to be installed in share. Until this is reolved properly at least allow overriding the plugin installation directory explicitly using make variables on the command line. See YosysHQ/yosys#3151 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 06d768d..870319d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ LIBGHDL_LIB:=$(shell $(GHDL) --libghdl-library-path) LIBGHDL_INC:=$(shell $(GHDL) --libghdl-include-dir) ALL_LDFLAGS=$(LIBGHDL_LIB) -Wl,-rpath,$(dir $(LIBGHDL_LIB)) $(LDFLAGS) -DATDIR:=$(shell $(YOSYS_CONFIG) --datdir) +PLUGINDIR:=$(shell $(YOSYS_CONFIG) --datdir)/plugins ALL_CFLAGS=-fPIC -DYOSYS_ENABLE_GHDL -I$(LIBGHDL_INC) $(CFLAGS) @@ -30,8 +30,8 @@ clean: force $(RM) -f ghdl.$(SOEXT) ghdl.o install: ghdl.$(SOEXT) - $(YOSYS_CONFIG) --exec mkdir -p $(DESTDIR)$(DATDIR)/plugins - $(YOSYS_CONFIG) --exec cp $< $(DESTDIR)$(DATDIR)/plugins + $(YOSYS_CONFIG) --exec mkdir -p $(DESTDIR)$(PLUGINDIR) + $(YOSYS_CONFIG) --exec cp $< $(DESTDIR)$(PLUGINDIR) -include src/ghdl.d -- cgit v1.2.3