2016-03-06 19:20:50 +00:00
|
|
|
EXEC=bin/crypto.ex
|
2016-03-07 09:54:50 +00:00
|
|
|
SRC=main.cpp
|
2016-03-06 19:20:50 +00:00
|
|
|
|
2016-03-07 09:54:50 +00:00
|
|
|
main: main.cpp jsoncpp.o
|
2016-03-06 19:20:50 +00:00
|
|
|
@echo "compilation de aes"
|
|
|
|
@g++ -Wall -Wextra -ggdb -o $(EXEC) $(SRC) obj/jsoncpp.o -lcrypto --std=c++14
|
|
|
|
|
|
|
|
jsoncpp.o: jsoncpp.cpp json/json.h json/json-forwards.h
|
|
|
|
@echo "compilation de jsoncpp"
|
|
|
|
@g++ -I ../lib/jsoncpp-master/include/ -Wall -Wextra -std=c++11 -c -ggdb jsoncpp.cpp -o obj/jsoncpp.o
|
|
|
|
|
|
|
|
run2:
|
|
|
|
@./bin/crypt.ex data/file && ./bin/decrypt.ex data/file.enc data/aesKey.key
|
2016-01-20 19:25:02 +00:00
|
|
|
|
|
|
|
run:
|
2016-03-06 19:20:50 +00:00
|
|
|
@./$(EXEC) file
|
|
|
|
|
|
|
|
decrypt.ex: mainDecrypt.cpp jsoncpp.o aes.hpp
|
|
|
|
@echo "compilation de decrypt.ex"
|
|
|
|
@g++ -Wall -Wextra -ggdb -o bin/decrypt.ex mainDecrypt.cpp obj/jsoncpp.o -lcrypto --std=c++14
|
|
|
|
|
|
|
|
crypt.ex: mainCrypt.cpp jsoncpp.o aes.hpp
|
|
|
|
@echo "compilation de crypt.ex"
|
|
|
|
@g++ -Wall -Wextra -ggdb -o bin/crypt.ex mainCrypt.cpp obj/jsoncpp.o -lcrypto --std=c++14
|
2016-01-23 21:57:15 +00:00
|
|
|
|
|
|
|
valgrind:
|
2016-03-06 19:20:50 +00:00
|
|
|
@valgrind --leak-check=full --track-origins=yes ./$(EXEC) file
|
|
|
|
|
|
|
|
clean: cleanO cleanB
|
|
|
|
|
|
|
|
cleanO:
|
2017-01-08 18:21:23 +00:00
|
|
|
@rm -rf obj/*.o
|
2016-03-06 19:20:50 +00:00
|
|
|
|
|
|
|
cleanB:
|
2017-01-08 18:21:23 +00:00
|
|
|
@rm -rf bin/*.ex
|
2016-01-17 23:12:13 +00:00
|
|
|
|
2016-03-06 19:20:50 +00:00
|
|
|
cleanD:
|
2017-01-08 18:21:23 +00:00
|
|
|
@/bin/rm -f data/*.enc
|
|
|
|
@/bin/rm -f data/*.dec
|
|
|
|
@/bin/rm -f data/*.key
|