Page 1 of 1

sub-targets within a makefile

Posted: Mon Oct 13, 2008 12:47 pm
by ChristianF
Hi Community, I have a little question:
Is it possible to create sub-targets in a Makefile, that it could be called e.g. like this:

Code: Select all

make -f ./Makefile ati=x700

Cheers Christian

Re: sub-targets within a makefile

Posted: Mon Oct 13, 2008 2:13 pm
by Combuster
yes.

within the makefile you can use "$(ATI)" which will then be substituted with "x700" when it is encountered.

For a live example: my makefile which does that with the parameters ARCH TYPE and TARGET variables.