Commit d9225017 authored by Federico Vaga's avatar Federico Vaga

sw:tools: add variable for tools destination and generic PREFIX

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 9bc39a0f
......@@ -28,7 +28,7 @@ make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
make -C software/tools EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/tools DESTDIR=%{buildroot}/usr/ install
make -C software/tools BINDESTDIR=%{buildroot}/%{_bindir} install
%files
%license LICENSES/GPL-3.0-or-later.txt
......
......@@ -7,7 +7,8 @@
REPO_PARENT ?= ../..
-include $(REPO_PARENT)/parent_common.mk
DESTDIR ?= /usr/local
PREFIX ?= /usr/local
BINDESTDIR ?= $(PREFIX)/bin
TRTL ?= ../..
TRTL_SW = $(TRTL)/software
......@@ -33,12 +34,12 @@ PROGS += mockturtle-gdbserver
all: $(PROGS)
install:
install -d $(DESTDIR)/bin
install -D $(PROGS) $(DESTDIR)/bin
install -d $(BINDESTDIR)
install -D $(PROGS) $(BINDESTDIR)
uninstall:
rm -f $(addprefix $(DESTDIR)/bin/,$(PROGS))
rmdir --ignore-fail-on-non-empty $(DESTDIR)/bin
rm -f $(addprefix $(BINDESTDIR)/,$(PROGS))
rmdir --ignore-fail-on-non-empty $(BINDESTDIR)
%: %.c $(TRTL_SW)/lib/libmockturtle.a
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment