help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recompile files for different parameters


From: Matthias Fechner
Subject: Recompile files for different parameters
Date: Mon, 07 Mar 2011 14:23:25 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b10pre) Gecko/20110114 Thunderbird/3.3a2

Dear list,

I have a small question regarding Makefile.
I have the case to compile a source tree with different CFLAGS, like
CFLAGS+=-DHARDWARE_REV_1

If I compile the source now it is compiled for hardware revision 1. What has to be compiled is defined by #ifdef statements in the code itself.

If I want to compile now for revision 2 I set other CFLAGS like:
CFLAGS+=-DHARDWARE_REV_2

The problem is now that make does not recompile the files again, because the dependencies are not different but the flags are.

Is there a possibility to put the flags into the dependencies so that make consider them?
Or should be another solution used for this case?

Thanks a lot for tips.

Bye,
Matthias

--
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook



reply via email to

[Prev in Thread] Current Thread [Next in Thread]