From 60d0ec43726bf134daa8e81e7a0ac089ed97f742 Mon Sep 17 00:00:00 2001 From: Alessandro Comodi Date: Thu, 21 May 2020 13:58:45 +0200 Subject: [PATCH] tools: added INSTALL cmake command Signed-off-by: Alessandro Comodi --- Makefile | 5 +++++ tools/CMakeLists.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index ecc11881..0db670ee 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ SHELL = bash ALL_EXCLUDE = third_party .git env build docs/env +INSTALL_DIR ?= + # Check if root ifeq ($(shell id -u),0) $(error ERROR: Running as ID 0) @@ -35,6 +37,9 @@ build: mkdir -p build cd build; cmake ..; $(MAKE) +install: + cd build; $(MAKE) DESTDIR=${INSTALL_DIR} install + .PHONY: env build # Run tests of code. diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 2ebadf19..6a166ebe 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -33,3 +33,5 @@ target_link_libraries(xc7frames2bit gflags libprjxray ) + +install(TARGETS xc7frames2bit xc7patch gen_part_base_yaml frame_address_decoder bittool segmatch bitread DESTINATION bin)