I am trying to parameterize my makefile targets. He currently has
TARGET = main
at the top. It deduces the SRC list from this, and also does many other things.
I changed my code to C, so I have several different top-level .c files to basically get build options. So what I want to do, basically do
make target1
or
make target2
And change what TARGET installed in the makefile. I am confused how to do this. I thought I could add something like
target1: all TARGET=target1
It didn't seem to work too well, though. Is there a common template for how this is done?
source share