restructure building binary: now looping over sources and
detecting the type depending on the suffix