build: use $(CURDIR) instead of $(PWD)

$(PWD) expands empty for some people, and doesn't honour -C