Using DESTDIR to provide option for install path
This commit is contained in:
parent
f1d53ddae1
commit
29ec8263d4
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -1,4 +1,5 @@
|
|||
GPP = g++ -Wall -std=c++17 -O3
|
||||
DESTDIR = /usr/bin
|
||||
|
||||
sloth: src/main.cpp src/parser/lex.yy.o src/parser/parser.tab.o src/variables/environment.o src/variables/variable.o src/variables/value.o src/operations/node.o src/operations/operators.o src/string.o src/shell.o
|
||||
$(GPP) src/main.cpp src/parser/lex.yy.o src/parser/parser.tab.o src/variables/environment.o src/variables/variable.o src/variables/value.o src/operations/node.o src/operations/operators.o src/string.o src/shell.o -ledit -o sloth
|
||||
|
@ -27,6 +28,6 @@ src/shell.o: src/shell.hpp src/shell.cpp
|
|||
src/string.o: src/string.h src/string.c
|
||||
$(GPP) -c src/string.c -o src/string.o
|
||||
install:
|
||||
mv sloth /usr/bin/
|
||||
install sloth $(DESTDIR)
|
||||
clean:
|
||||
rm src/parser/lex.yy.c src/parser/parser.tab.c src/parser/parser.tab.h src/parser/lex.yy.o src/parser/parser.tab.o src/variables/environment.o src/variables/variable.o src/variables/value.o src/operations/node.o src/operations/operators.o src/string.o src/shell.o sloth
|
||||
|
|
Reference in a new issue