fix flags passing

- CC not used for compiling
- CFLAGS not used
- LDFLAGS now effective
- CXXFLAGS must be passed to make as env