Replace PWD with CURDIR in Makefile

... so that it is possible to invoke make with -C flag from another
directory.