all: one_opt_align opt_pairs

one_opt_align:
	g++ -DFIND_ONE_OPT_ALIGN -O3 -Wall -o find_one_opt_align align.cpp munkres.cpp matrix.cpp -lstdc++

opt_pairs:
	g++ -DFIND_OPT_PAIRS -O3 -Wall -o find_opt_pairs align.cpp munkres.cpp matrix.cpp -lstdc++

test_all:
	./find_one_opt_align new_one_opt_align new_mod_paired_cost_matrix test_vectors/test_paired_cost_matrix
	./find_opt_pairs new_opt_pairs test_vectors/test_one_opt_align test_vectors/test_mod_paired_cost_matrix test_vectors/test_paired_cost_matrix 0 299
	./find_opt_pairs new_opt_pairs test_vectors/test_one_opt_align test_vectors/test_mod_paired_cost_matrix test_vectors/test_paired_cost_matrix 300 599
	./find_opt_pairs new_opt_pairs test_vectors/test_one_opt_align test_vectors/test_mod_paired_cost_matrix test_vectors/test_paired_cost_matrix 600 953	
	chmod +x test_files
	./test_files

clean:
	rm -f core *.o find_one_opt_align find_opt_pairs
	rm -f new_one_opt_align test_one_opt_align_diff new_mod_paired_cost_matrix test_mod_paired_cost_matrix_diff
	rm -f new_opt_pairs_0_299 test_opt_pairs_0_299_diff
	rm -f new_opt_pairs_300_599 test_opt_pairs_300_599_diff
	rm -f new_opt_pairs_600_953 test_opt_pairs_600_953_diff
