Add support for pure- builds
Small changes to generic.mk
Merge common/
Use program instead of sed