aes/Makefile

41 lines
1.0 KiB
Makefile

EXEC=bin/crypto.ex
SRC=main.cpp
main: main.cpp jsoncpp.o
@echo "compilation de aes"
@g++ -Wall -Wextra -ggdb -o $(EXEC) $(SRC) obj/jsoncpp.o -lcrypto --std=c++14
obj/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
run:
@./$(EXEC) file
decrypt.ex: mainDecrypt.cpp obj/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
valgrind:
@valgrind --leak-check=full --track-origins=yes ./$(EXEC) file
clean: cleanO cleanB
cleanO:
@rm -rf obj/*.o
cleanB:
@rm -rf bin/*.ex
cleanD:
@/bin/rm -f data/*.enc
@/bin/rm -f data/*.dec
@/bin/rm -f data/*.key