I have some problems with makefiles and I would appreciate any help
I try to write a basic makefile which looks like
<tab>gcc -o read_init read_initCon.c -lm
but the result is not the compilation of my program but the second line is printed to the shell and thats it... if I delete -lm at the end, the compilation is working, but I need the link, so the compilation is not successful. Where is my mistake?
second: I have some Makefiles in a folder and they are named like galaxy.Makefile, cluster.Makefile etc. Does anybody know how I can execute this makefiles?
thanks for any help
Without knowing exactly what error you get, I can't really say what is going wrong in your simple makefile - it looks fine as posted.
If you want make to use a file not called Makefile or makefile, then
will do the job of using "somefilename" as the input file.
make -f somefilename
thanks for the answer. I solved the problem with the makefile... just stupidity...:-)