May be somebody knows.
I keep my object files into two directories.
In one is master code.
In other is currently developing objects.
When I am linking I want to use some files from master directory the others from current.
With vendor compilers I am creating objlist.txt file with list of objects full names kind of:
/usr/people/me/master_obj/start.o
/usr/people/me/local_obj/interface.o
and use option fot ld:
on SGI: -objectlist objlist.txt
on HP: -c objlist.txt
on SUN: I didn't find this option so I am creating make on the fly (by my script) with full list of objects.
Now I am trying to use gcc to compile my project and I didn't find this option (read object files list from text file) at all.
I see the only one way (like with SUN) to create makefile on the fly. Is there any other way?
I am not using archive .a because in master directory I have the same object files as in local. If I will put all directory .o files into .a and put both archive file in ld command line, linker can find wrong object (master instead of local) and will use old function. This happend on HP.
May be this will be Ok with gcc if I will put local.a first ad then master.a and linker will always take function from local.c first. Is it so?
Thanks. [sig][/sig]
I keep my object files into two directories.
In one is master code.
In other is currently developing objects.
When I am linking I want to use some files from master directory the others from current.
With vendor compilers I am creating objlist.txt file with list of objects full names kind of:
/usr/people/me/master_obj/start.o
/usr/people/me/local_obj/interface.o
and use option fot ld:
on SGI: -objectlist objlist.txt
on HP: -c objlist.txt
on SUN: I didn't find this option so I am creating make on the fly (by my script) with full list of objects.
Now I am trying to use gcc to compile my project and I didn't find this option (read object files list from text file) at all.
I see the only one way (like with SUN) to create makefile on the fly. Is there any other way?
I am not using archive .a because in master directory I have the same object files as in local. If I will put all directory .o files into .a and put both archive file in ld command line, linker can find wrong object (master instead of local) and will use old function. This happend on HP.
May be this will be Ok with gcc if I will put local.a first ad then master.a and linker will always take function from local.c first. Is it so?
Thanks. [sig][/sig]