2018-09-28 03:33:48 +00:00
|
|
|
GPP = g++ -Wall -std=c++17 -O3
|
2020-01-28 01:10:05 +00:00
|
|
|
DESTDIR ?= /usr
|
2018-09-26 20:44:22 +00:00
|
|
|
|
2018-09-26 23:28:55 +00:00
|
|
|
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
|
2018-09-26 20:44:22 +00:00
|
|
|
src/parser/lex.yy.o: src/parser/lex.yy.c src/parser/parser.tab.h
|
|
|
|
$(GPP) -c src/parser/lex.yy.c -o src/parser/lex.yy.o
|
2018-09-26 02:37:05 +00:00
|
|
|
src/parser/parser.tab.o: src/parser/parser.tab.c
|
2018-09-26 20:44:22 +00:00
|
|
|
$(GPP) -c src/parser/parser.tab.c -o src/parser/parser.tab.o
|
2018-09-26 02:37:05 +00:00
|
|
|
src/parser/parser.tab.h: src/parser/parser.y
|
|
|
|
bison -d -o src/parser/parser.tab.c src/parser/parser.y
|
|
|
|
src/parser/parser.tab.c: src/parser/parser.y
|
|
|
|
bison -d -o src/parser/parser.tab.c src/parser/parser.y
|
|
|
|
src/parser/lex.yy.c: src/parser/lexer.l
|
|
|
|
flex -o src/parser/lex.yy.c src/parser/lexer.l
|
2018-09-26 23:28:55 +00:00
|
|
|
src/variables/environment.o: src/variables/environment.hpp src/variables/environment.cpp
|
|
|
|
$(GPP) -c src/variables/environment.cpp -o src/variables/environment.o
|
|
|
|
src/variables/variable.o: src/variables/variable.hpp src/variables/variable.cpp
|
|
|
|
$(GPP) -c src/variables/variable.cpp -o src/variables/variable.o
|
|
|
|
src/variables/value.o: src/variables/value.hpp src/variables/value.cpp
|
|
|
|
$(GPP) -c src/variables/value.cpp -o src/variables/value.o
|
|
|
|
src/operations/operators.o: src/operations/operators.hpp src/operations/operators.cpp
|
|
|
|
$(GPP) -c src/operations/operators.cpp -o src/operations/operators.o
|
|
|
|
src/operations/node.o: src/operations/node.hpp src/operations/node.cpp
|
|
|
|
$(GPP) -c src/operations/node.cpp -o src/operations/node.o
|
|
|
|
src/shell.o: src/shell.hpp src/shell.cpp
|
|
|
|
$(GPP) -c src/shell.cpp -o src/shell.o
|
2018-09-26 19:43:08 +00:00
|
|
|
src/string.o: src/string.h src/string.c
|
2018-09-26 20:44:22 +00:00
|
|
|
$(GPP) -c src/string.c -o src/string.o
|
2020-01-28 00:32:44 +00:00
|
|
|
install:
|
2020-01-28 01:19:34 +00:00
|
|
|
install -Dt $(DESTDIR)/bin/ sloth
|
2018-09-19 02:50:15 +00:00
|
|
|
clean:
|
2018-09-26 20:44:22 +00:00
|
|
|
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
|