I want to setup a makefile for a newbie user, so that all of his C files
(that use math) compile and link OK. I was hoping to do that by simply
creating a Makefile with only the line "LDFLAGS=-lm", but then the
compiler is called with

  cc -lm file.c -o file

i.e., the wrong order (-lm should have appeared at the end of the commandline).

Does anyone know of a variable I can set, or a rule I can create that
(preferably easily) will do what I want (I.e., run the compiler with
"cc -o file123 file123.c -lm", when he types "make file123")

Thanks, 

(feeling stupid, though).

-- 
joost witteveen, [EMAIL PROTECTED]

My spamfilter is so good, it correctly catches 90% of incoming spam,
*including* all email from my PhD supervisor.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to