This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
makefile [2015/08/07 10:21] pendor |
makefile [2015/09/04 05:59] (current) pendor [conditional] |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ==== conditional ==== | ==== conditional ==== | ||
| + | checking the value of a variable | ||
| <code> | <code> | ||
| ifeq ($(PLATFORM),Linux) | ifeq ($(PLATFORM),Linux) | ||
| Line 13: | Line 14: | ||
| CMD = dir | CMD = dir | ||
| endif | endif | ||
| + | </code> | ||
| + | For just checking eistence of a variable use ''ifdef'' and ''ifndef'' | ||
| + | <code> | ||
| + | ifdef VARNAME | ||
| + | do something | ||
| + | endif | ||
| + | </code> | ||
| + | |||