From b9064e2c8280b19a68fd2ff82f16449c2e15255c Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Mon, 17 Feb 2020 10:49:47 +0000 Subject: [PATCH] installation target in makefile --- eatit => eatraw | Bin makefile | 25 +++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) rename eatit => eatraw (100%) diff --git a/eatit b/eatraw similarity index 100% rename from eatit rename to eatraw diff --git a/makefile b/makefile index 99f5ce3..6f66e4c 100644 --- a/makefile +++ b/makefile @@ -1,14 +1,35 @@ +SHELL:=/bin/bash + RAW = ../raw/ SRC = src/ -EXE = eatit +EXE = eatraw CCC = g++ -std=c++11 OPT = -O3 -Wall -mavx -mno-tbm -mf16c -mno-f16c - + +# build executable $(EXE) : $(SRC)main.cpp $(SRC)raweat.hpp $(SRC)half_precision_floating_point.hpp $(CCC) $(OPT) $< -o $@ +# remove executable clean : rm -f $(EXE) + +# check existence of name of executable globally +chexe:=$(shell command -v $(EXE)) + +# install executable if name does not exist yet +install : $(EXE) +ifeq ($(chexe),) + sudo cp $(EXE) /usr/local/bin/ +else + @echo "executable with same name already exists! choose different name!" + @exit 1 +endif + +# deinstall +deinstall : + sudo rm /usr/local/bin/$(EXE) +