make DEBUG_FLAGS=-g2 You can compile something for debugging at debugging level 2. It will also take care not to strip the resulting executable(s).