> From: Stephanie KOUOI <firstname.lastname@example.org>
> Date: Fri, 8 Nov 2013 09:43:57 +0100
>So %.c matches .\Sources\App/APPdemtp.c, while $(DIR_OBJECTS)%.obj
> 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
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.
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.