There's an awful lot more than just this wrong with that Makefile. Forinstance, NATIVE can never be set because ifeq() isn't globbing in makescripts ... So I think a final (and dynamically choosing if unset)solution is this one.