Let whap read the input produced by inputgen
Add CXXFLAGS to Makefile
Move variables from local scope to main and remove unused variables