installation target in makefile
This commit is contained in:
parent
9a588570cc
commit
b9064e2c82
25
makefile
25
makefile
@ -1,14 +1,35 @@
|
|||||||
|
|
||||||
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
RAW = ../raw/
|
RAW = ../raw/
|
||||||
|
|
||||||
SRC = src/
|
SRC = src/
|
||||||
EXE = eatit
|
EXE = eatraw
|
||||||
|
|
||||||
CCC = g++ -std=c++11
|
CCC = g++ -std=c++11
|
||||||
OPT = -O3 -Wall -mavx -mno-tbm -mf16c -mno-f16c
|
OPT = -O3 -Wall -mavx -mno-tbm -mf16c -mno-f16c
|
||||||
|
|
||||||
|
# build executable
|
||||||
$(EXE) : $(SRC)main.cpp $(SRC)raweat.hpp $(SRC)half_precision_floating_point.hpp
|
$(EXE) : $(SRC)main.cpp $(SRC)raweat.hpp $(SRC)half_precision_floating_point.hpp
|
||||||
$(CCC) $(OPT) $< -o $@
|
$(CCC) $(OPT) $< -o $@
|
||||||
|
|
||||||
|
# remove executable
|
||||||
clean :
|
clean :
|
||||||
rm -f $(EXE)
|
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)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user