help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different source dirs and one build dir [SOLVED]


From: zamek42
Subject: Re: different source dirs and one build dir [SOLVED]
Date: Tue, 12 Jul 2016 15:00:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0

Hi All,

On 07/11/2016 09:38 PM, Paul Smith wrote:
On Mon, 2016-07-11 at 21:24 +0200, zamek42 wrote:
There are two files with the same name: _reset_hardware.c and
_initialize_hardwer.c. I need these files from only one directory.
That is the reason why I cannot use vpath.
Well, vpath searches directories in order so if you only want one
instance of those files and they are both in the same directory, you
can just ensure that the directory you want comes first in the vpath
list, before the one you don't want.
I could solve the problem. There need all of the duplicated files, because its functions are tagged with (weak) tag:

void
__attribute__((weak))
__initialize_hardware_early(void)

and the other is:

void
__initialize_hardware(void)

I made a list with all source files including its directory, named SRC and I changed .c to .o in this list named OBJ. At the compiling the object files stored into build/<full_path>/<filename.o> file. Linker can links these object and clean is easy because I need to remove build directory.


Thank you for the help...


--
thx
Zoltan (Zamek) Zidarics
programmer
email:address@hidden
Self Playing Pipe Organ Systems
http://replayorgan.eu




reply via email to

[Prev in Thread] Current Thread [Next in Thread]