-
makefiles
I'm trying to figure out how this makefile works. Can anyone help me? We've been given a makefile that works with gcc and I'm trying to get it to work with borland cc. I guess I need to change 'gcc' to 'bcc32' and adjust options as necessary, and also to change .o to .obj, but I've no idea what this does:
tree: lib myTree.o
gcc myTree.o -L. -R. -ltree -o tree
lib: tree.o
ld -h libtree.so -dy -G -o libtree.so tree.o
what do lib and ld do? and what is an .so file?
And what do I do with this line:
clean:
rm -rf *.o tree libtree.so
something like del *.obj.....?
sorry about all the wordage, but I guess you need as much info as possible.
-
If you're really handy with a batch file you can more or less reproduce a makefile. How large of a program are you trying to compile?
-
The world is waiting. I must leave you now.
Shadow, that's nice. Where is it from?
-
What kind of a question is that?
-
Shadow,
I assumed it was a quote. Did you write it?
-
It is a quote. I didn't write it. :confused:
-
It sounds kind of magical. I searched for it, but couldn't find anything. Is it from a movie or something?
-
You searched for a quote that someone uses in their signature?
-
Yeah, I think I'll use it in my posts, as well. Thanks!
__________________
The world is waiting. I must leave you now.
-
>Yeah, I think I'll use it in my posts, as well.
Ever see single white female...
-
Wow, 9 replies, I thought, must be something useful there......never mind.
Er, to go back to your original question shadow, it's not a very big program - 4 main files, about 350 lines total.
I used to be able to do a thing or two with batch files, many years ago. What do you suggest?
-
I have never used borland, so I don't know how much help I can be. I do know that with gcc you could do:
Code:
REM batch file code
gcc -c -g file1.c
gcc -c -g file2.c
gcc -c -g file3.c
gcc -o Program file1.o file2.o file3.o
-
Do you need to know how a gcc makefile works, or do you already know that and you just want a makefile that will work with borland.
I can explain the gcc makefile, but I am not familiar with borland.
-
I just wondered what those lines of code in my first post actually did - particularly the bit about 'lib'. I also don't know where the libtree.so file came from. I should be able to make up a batch file once I know what each part does.
Do you need any more information?