Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/em100/+/46927 )
Change subject: Add install and uninstall targets to Makefile ......................................................................
Add install and uninstall targets to Makefile
- Will install em100 to /usr/local/bin - Will install udev rule to /usr/lib/udev/rules.d
The current udev rule assumes that there is a plugdev group that contains every user allowed to talk to connected EM100Pro devices. Some systems do not have this group, but Debian / Ubuntu are using it by default.
Signed-off-by: Alexander Amelkin a.amelkin@yadro.com Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: Ibfcd6f9f2f577b1f7d8d2d4b0a89405d38264d3d Reviewed-on: https://review.coreboot.org/c/em100/+/46927 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M Makefile 1 file changed, 12 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/Makefile b/Makefile index a5b8c33..1248780 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,8 @@ CC ?= gcc PKG_CONFIG ?= pkg-config
+PREFIX ?= /usr/local + XZ = xz/xz_crc32.c xz/xz_crc64.c xz/xz_dec_bcj.c xz/xz_dec_lzma2.c xz/xz_dec_stream.c SOURCES = em100.c firmware.c fpga.c hexdump.c sdram.c spi.c system.c trace.c usb.c SOURCES += image.c curl.c chips.c tar.c $(XZ) @@ -71,6 +73,16 @@ distclean: clean rm -f em100pro_chips.h
+install: em100 60-dediprog-em100pro.rules + install -m 755 -d $(DESTDIR)/usr/lib/udev/rules.d/ + install -m 644 60-dediprog-em100pro.rules $(DESTDIR)/usr/lib/udev/rules.d/ + install -m 755 -d $(DESTDIR)$(PREFIX)/bin/ + install -s -m 750 -g plugdev em100 $(DESTDIR)$(PREFIX)/bin/ + +uninstall: /usr/local/bin/em100 + rm -f $(DESTDIR)/usr/lib/udev/rules.d/60-dediprog-em100pro.rules + rm -f $(DESTDIR)$(PREFIX)/bin/em100 + -include .dependencies
.PHONY: clean distclean tarballs