initial commit
Generalized the build enironment
Fixed dir bug for main target