diff --git a/src/Makefile b/src/Makefile index a12a2ac..f0edd4b 100755 --- a/src/Makefile +++ b/src/Makefile @@ -10,6 +10,10 @@ # g++ -c -std=c++11 functions.cpp # default: build +release: optimized + +optimized: + g++ -std=c++11 -O2 -Wall -o chess.out functions.cpp chess.cpp build: - g++ -O2 -Wall -o chess.out functions.cpp chess.cpp -std=c++11 + g++ -Wall -o chess_unoptimized.out functions.cpp chess.cpp -std=c++11 diff --git a/tests/Makefile b/tests/Makefile index 402f303..2a8f2f5 100755 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,5 +1,6 @@ defualt: all.out bitwise: bitwise.out +release: all_optimized.out clean: rm all.out @@ -11,11 +12,23 @@ catch_main.o: g++ -w -c -o catch_main.o catch_main.cpp custom_printing.o: - g++ -w -I../src/ -c -o custom_printing.o custom_printing.cpp + g++ -Wall -I../src/ -c -o custom_printing.o custom_printing.cpp bitwise.out: catch_main.o - g++ -w -I../src -o bitwise.out catch_main.o bitwise_tests.cpp + g++ -Wall -I../src -o bitwise.out catch_main.o bitwise_tests.cpp # TODO: Allw all.out to contain bitwise tests all.out: catch_main.o custom_printing.o - g++ -std=c++11 -ggdb -w -I../src/ -o all.out ../src/functions.cpp catch_main.o custom_printing.o test_functions.cpp main.cpp + g++ -std=c++11 -ggdb -Wall -I../src/ -o all.out ../src/functions.cpp catch_main.o custom_printing.o test_functions.cpp main.cpp + +catch_main_optimized.o: + g++ -w -O2 -c -o catch_main_optimized.o catch_main.cpp + +custom_printing_optimized.o: + g++ -Wall -O2 -I../src/ -c -o custom_printing_optimized.o custom_printing.cpp + +bitwise_optimized.out: catch_main_optimized.o + g++ -Wall -O2 -I../src -o bitwise_optimized.out catch_main_optimized.o bitwise_tests.cpp + +all_optimized.out: catch_main_optimized.o custom_printing_optimized.o + g++ -std=c++11 -O2 -Wall -I../src/ -o all_optimized.out ../src/functions.cpp catch_main_optimized.o custom_printing_optimized.o test_functions.cpp main.cpp