New to Linux/Ubuntu Edgy...
I am trying to write my first makefile for last 3 hours. So far couldn't make it. I copied couple simple makefile examples and non of them worked: here is one:
Tried one on the top and got message that myfile.o doesn't exists.
I have this: myfile.c myfilefunc.c and myfile.h
In the same folder I created makefile, assigned execute privilege for myself, made sure that every command start with tab.
I produced this:
so.... why this doesnt work? I tried to use variables, but non of them would get recognized... what I am doing wrong?
I am trying to write my first makefile for last 3 hours. So far couldn't make it. I copied couple simple makefile examples and non of them worked: here is one:
Tried one on the top and got message that myfile.o doesn't exists.
I have this: myfile.c myfilefunc.c and myfile.h
In the same folder I created makefile, assigned execute privilege for myself, made sure that every command start with tab.
I produced this:
Code:
myfile : myfile.o myfilefunc.o
gcc -o myfile myfile.o myfilefunc.o
myfile.o : myfile.c
gcc -c myfile.c
myfilefunc.o : myfilefunc.c
gcc -c myfilefunc.c
so.... why this doesnt work? I tried to use variables, but non of them would get recognized... what I am doing wrong?