sub-targets within a makefile

Programming, for all ages and all languages.
Post Reply
ChristianF
Member
Member
Posts: 79
Joined: Sun Jun 10, 2007 11:36 am

sub-targets within a makefile

Post 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
42
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: sub-targets within a makefile

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply