update Makefile, change print function, use printf directly