Fix for building with/without Perl wrappers

Removed Perl targets from default targets because the object files are built with flags that conflict with the main build.

Use CXX in preference to CC

Respect user-provided CXXFLAGS