OPTIONS = -lgmp -lmpfr --pedantic --std=c++98 -Wall
CC = g++

testdir = test/
exampledir = examples/

exampleprefix = example-
testprefix = test-

binpostfix = 

oldincludedir = /usr/include
docdir = /usr/share/doc

check :

	$(CC) $(exampledir)fp_comparator.cpp -o $(exampleprefix)fp_comparator$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)native_complex.cpp -o $(testprefix)native_complex$(binpostfix) $(OPTIONS)
	$(CC) $(exampledir)quick_start.cpp -o $(exampleprefix)quick_start$(binpostfix) $(OPTIONS)
	$(CC) $(exampledir)round_modes.cpp -o $(exampleprefix)round_modes$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)std_complex.cpp -o $(testprefix)std_complex$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)constants.cpp -o $(testprefix)constants$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)initialization.cpp -o $(testprefix)initialization$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)special_functions.cpp -o $(testprefix)special_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)trigonometric_functions.cpp -o $(testprefix)trigonometric_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)hyperbolic_functions.cpp -o $(testprefix)hyperbolic_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)exponential_functions.cpp -o $(testprefix)exponential_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)logarithmic_functions.cpp -o $(testprefix)logarithmic_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)inverse_hyperbolic_functions.cpp -o $(testprefix)inverse_hyperbolic_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)inverse_trigonometric_functions.cpp -o $(testprefix)inverse_trigonometric_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)std_overloads.cpp -o $(testprefix)std_overloads$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)miscellaneous_functions.cpp -o $(testprefix)miscellaneous_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)integer_related_functions.cpp -o $(testprefix)integer_related_functions$(binpostfix) $(OPTIONS)
	$(CC) $(testdir)basic_arithmetic_functions.cpp -o $(testprefix)basic_arithmetic_functions$(binpostfix) $(OPTIONS)

	$(CC) $(exampledir)nacre_polynomial.cpp -o $(exampleprefix)nacre_polynomial$(binpostfix) $(OPTIONS)
	$(CC) $(exampledir)nacre_polynomial_roots.cpp -o $(exampleprefix)nacre_polynomial_roots$(binpostfix) $(OPTIONS)

	./$(exampleprefix)fp_comparator$(binpostfix)
	./$(exampleprefix)quick_start$(binpostfix)
	./$(exampleprefix)round_modes$(binpostfix)
	./$(testprefix)native_complex$(binpostfix)
	./$(testprefix)std_complex$(binpostfix)
	./$(testprefix)constants$(binpostfix)
	./$(testprefix)initialization$(binpostfix)
	./$(testprefix)special_functions$(binpostfix)
	./$(testprefix)trigonometric_functions$(binpostfix)
	./$(testprefix)hyperbolic_functions$(binpostfix)
	./$(testprefix)exponential_functions$(binpostfix)
	./$(testprefix)logarithmic_functions$(binpostfix)
	./$(testprefix)std_overloads$(binpostfix)
	./$(testprefix)inverse_hyperbolic_functions$(binpostfix)
	./$(testprefix)inverse_trigonometric_functions$(binpostfix)
	./$(testprefix)miscellaneous_functions$(binpostfix)
	./$(testprefix)integer_related_functions$(binpostfix)
	./$(testprefix)basic_arithmetic_functions$(binpostfix)
	./$(exampleprefix)nacre_polynomial$(binpostfix)
	./$(exampleprefix)nacre_polynomial_roots$(binpostfix)

#	rm $(exampleprefix)*$(binpostfix) $(testprefix)*$(binpostfix)

clean :
	rm -f $(exampleprefix)*$(binpostfix) $(testprefix)*$(binpostfix)