|
|
|
|
|
by ainar-g
1415 days ago
|
|
To be fair, if you need conditionals in target bodies, you're probably better off putting the body into a separate file as a shell script. And if you need conditionals in macros, there's the old macro-in-macro approach: DEBUG = 0
DEBUG_FLAG_0 =
DEBUG_FLAG_1 = --debug
# …
main.bin: 1.o 2.o # …
build $(DEBUG_FLAG_$(DEBUG)) -o main.bin # …
I'm not saying that it's a good way, but it is a way. |
|