aes/makefile

41 lines
1005 B
Makefile
Raw Normal View History

EXEC=bin/crypto.ex
SRC=aes.cpp
main: aes.cpp jsoncpp.o
@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:
@./$(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:
@valgrind --leak-check=full --track-origins=yes ./$(EXEC) file
clean: cleanO cleanB
cleanO:
@rm obj/*.o
cleanB:
@rm bin/*.ex
cleanD:
@rm data/*.enc
@rm data/*.dec
@rm data/*.key