Replace writing each .o file manually with using wildcard.