SyntaxFix
Write A Post
Hire A Developer
Questions
The simplest way is:
make foo=bar target
Then in your makefile you can refer to $(foo). Note that this won't propagate to sub-makes automatically.
$(foo)
If you are using sub-makes, see this article: Communicating Variables to a Sub-make