simplify .tmp file name generation in Makefile