It does not work either... I still have the same issue.


On Fri, Nov 8, 2013 at 10:32 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Stephanie KOUOI <stephanie.kouoi.ext@valeo.com>
> Date: Fri, 8 Nov 2013 09:43:57 +0100
>
> APPdemtp.c is located in .\Sources\App repertory
>
> > $(DIR_OBJECTS)%.obj : %.c
>
> I already use $@  in the recipe, but Make seems not to understand this rule
> because of => %.c

So %.c matches .\Sources\App/APPdemtp.c, while $(DIR_OBJECTS)%.obj
should produce .\$(TARGET)\out\obj/APPdemtp.obj.  How can you expect
this to work?  What wizardry is supposed to remove the .\Sources\App/
part from %.c?

What I meant is to do something much more straightforward:

VPATH += $(dir $(ALL_C_SOURCES)) $(DIR_OBJECTS)
%.obj : %.c
        $(COMPILE) @< -o $(DIR_OBJECTS)/$(notdir $@)

where $(COMPILE) is whatever you need to invoke the compiler, and -o
is the switch to direct the compiler where to produce its output.

Note that $(DIR_OBJECTS) is added to VPATH so that Make will find the
*.obj files and not re-generate them if they are already up to date.



--
Cordialement / Kind regards,

Stephanie KOUOI
Software Standardization & Tools Engineer
Valeo Switches & Smart Controls
Creteil / +33148845388
stephanie.kouoi.ext@valeo.com

This e-mail message is intended only for the use of the intended recipient(s).
The information contained therein may be confidential or privileged,
and its disclosure or reproduction is strictly prohibited.
If you are not the intended recipient, please return it immediately to its sender 
at the above address and destroy it.