make the gcc/clang specific parts automatically work based on CC
-rdynamic should be an LDFLAG
don't pass LDFLAGS to every compilation unit, just the final link.