fix CXXFLAGS variable name

the pedantic target-specific variable used CFLAGS
instead of CXXFLAGS. Also, made install target .PHONY