Portable TARGET selection.

Found in a Makefile by jasper. Thanks, jasper!