put check of CXXFLAGS and FFLAGS into a separate function
make -fPIC check work in case the compilers have a name postfix
reorder the variables in the Makefile and in the printout for readability