1010# ##############################################################################
1111
1212SRC1 = Hypercomplex.hpp
13- SRC2 = Polynomial.hpp
13+ SRC2 = Hypercomplex_MPFR.hpp
14+ SRC3 = Polynomial.hpp
1415
1516UNAME_S := $(shell uname -s)
1617ifeq ($(UNAME_S ) ,Linux)
4243# Install
4344# =============================================================================
4445
45- install : $(INCLUDE_PREFIX ) /Hypercomplex/$(SRC1 ) $(INCLUDE_PREFIX ) /Hypercomplex/$(SRC2 )
46+ install : $(INCLUDE_PREFIX ) /Hypercomplex/$(SRC1 ) $(INCLUDE_PREFIX ) /Hypercomplex/$(SRC2 ) $( INCLUDE_PREFIX ) /Hypercomplex/ $( SRC3 )
4647
4748# Create a separate directory for the header-only library
4849$(INCLUDE_PREFIX ) /Hypercomplex :
@@ -52,10 +53,14 @@ $(INCLUDE_PREFIX)/Hypercomplex:
5253$(INCLUDE_PREFIX ) /Hypercomplex/$(SRC1 ) : hypercomplex/$(SRC1 ) $(INCLUDE_PREFIX ) /Hypercomplex
5354 @cp $< $@
5455
55- # Copy the helper library file into the right directory
56+ # Copy the class specialisation file into the right directory
5657$(INCLUDE_PREFIX ) /Hypercomplex/$(SRC2 ) : hypercomplex/$(SRC2 ) $(INCLUDE_PREFIX ) /Hypercomplex
5758 @cp $< $@
5859
60+ # Copy the helper library file into the right directory
61+ $(INCLUDE_PREFIX ) /Hypercomplex/$(SRC3 ) : hypercomplex/$(SRC3 ) $(INCLUDE_PREFIX ) /Hypercomplex
62+ @cp $< $@
63+
5964# =============================================================================
6065# Uninstall
6166# =============================================================================
@@ -72,8 +77,9 @@ uninstall:
7277test :
7378 @mkdir .test/unit/hypercomplex
7479 @cp hypercomplex/Hypercomplex.hpp .test/unit/hypercomplex/Hypercomplex.hpp
80+ @cp hypercomplex/Hypercomplex_MPFR.hpp .test/unit/hypercomplex/Hypercomplex_MPFR.hpp
7581 @cp hypercomplex/Polynomial.hpp .test/unit/hypercomplex/Polynomial.hpp
76- @g++ -O0 -Wall --std=c++17 -o test .test/unit/test.cpp -lmpfr -lgmp
82+ @g++ -DUSEMPFR=1 - O0 -Wall --std=c++17 -o test .test/unit/test.cpp -lmpfr -lgmp
7783 @./test [unit] -d yes -w NoAssertions --use-colour yes --benchmark-samples 100 --benchmark-resamples 100000
7884 @rm -rf .test/unit/hypercomplex test
7985
8490# Run static code analysis
8591lint :
8692 @cpplint hypercomplex/Hypercomplex.hpp
93+ @cpplint hypercomplex/Hypercomplex_MPFR.hpp
8794 @cpplint hypercomplex/Polynomial.hpp
8895
8996# =============================================================================
0 commit comments