|
From: | Matthias Fechner |
Subject: | Re: Recompile files for different parameters |
Date: | Thu, 17 Mar 2011 16:26:44 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b13pre) Gecko/20110314 Thunderbird/3.3a3 |
On 09.03.11 16:34, Krzysztof Cieniuch wrote:
The first problem with your makefile is that you cannot use automatic variable ($@) in prerequisite list unless you turn on second expansion (I don't use that feature so do not know much about it but use in sample below :-))).
thanks your example it helped me to understand some basic rules.I have now a very nice Makefile ready which rebuilds .c files if required .h files are changed.
And also rebuild if the CFLAGS are changed so it does exactly what I need.I attached my short short example so anyone how has the same problem can use it as a template.
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
Makefile
Description: Text document
hello.h
Description: Text document
hello.c
Description: Text document
a.c
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |