Use global variables for compiler and flags
A bit of code refactoring