aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-01-17 14:14:10 +0100
committerClifford Wolf <clifford@clifford.at>2018-01-17 14:14:10 +0100
commit57e02b662906f80ae43445a328c5476d1b92bd60 (patch)
treea8b41002400cbc3f690ccc9fb07921dcf4408e9d
parent9ac560f5d3e5847b7e475195f66b7034e91fd938 (diff)
downloadyosys-57e02b662906f80ae43445a328c5476d1b92bd60.tar.gz
yosys-57e02b662906f80ae43445a328c5476d1b92bd60.tar.bz2
yosys-57e02b662906f80ae43445a328c5476d1b92bd60.zip
Strip debug symbols from binaries on install
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d3ddbd870..e9627f8d9 100644
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,7 @@ PLUGIN_LDFLAGS :=
PKG_CONFIG ?= pkg-config
SED ?= sed
BISON ?= bison
+STRIP ?= strip
ifeq (Darwin,$(findstring Darwin,$(shell uname)))
PLUGIN_LDFLAGS += -undefined dynamic_lookup
@@ -499,11 +500,21 @@ clean-unit-test:
install: $(TARGETS) $(EXTRA_TARGETS)
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR)
- $(INSTALL_SUDO) install $(TARGETS) $(DESTDIR)$(BINDIR)
+ $(INSTALL_SUDO) cp $(TARGETS) $(DESTDIR)$(BINDIR)
+ifneq ($(filter yosys,$(TARGETS)),)
+ $(INSTALL_SUDO) $(STRIP) -d $(DESTDIR)$(BINDIR)/yosys
+endif
+ifneq ($(filter yosys-abc,$(TARGETS)),)
+ $(INSTALL_SUDO) $(STRIP) $(DESTDIR)$(BINDIR)/yosys-abc
+endif
+ifneq ($(filter yosys-filterlib,$(TARGETS)),)
+ $(INSTALL_SUDO) $(STRIP) $(DESTDIR)$(BINDIR)/yosys-filterlib
+endif
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(DATDIR)
$(INSTALL_SUDO) cp -r share/. $(DESTDIR)$(DATDIR)/.
ifeq ($(ENABLE_LIBYOSYS),1)
$(INSTALL_SUDO) cp libyosys.so $(DESTDIR)$(LIBDIR)
+ $(INSTALL_SUDO) $(STRIP) -d $(DESTDIR)$(LIBDIR)/libyosys.so
$(INSTALL_SUDO) ldconfig
endif