Update makefile to build libdwarf from source if it is not found
Add appropriate flags for different build targets