fixed build system to support multiple archs