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)