Optimization and makefile updates for profile builds