> On Feb 9, 2017, at 11:17 AM, Todor Minchev <todor.minc...@linux.intel.com> 
> wrote:
> 
> A debug version of the rmc binary can be built by using the debug
> Makefile target. This will include debug symbols and will disable
> compiler optimizations.
> 
> Example:
> 
> make debug
> 
> Signed-off-by: Todor Minchev <todor.minc...@linux.intel.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index c58047a..fdd936f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -23,6 +23,8 @@ ALL_OBJS := $(RMC_TOOL_OBJ) $(RMC_LIB_OBJ)
> RMC_CFLAGS := -Wall -I$(TOPDIR)/inc
> 
> all: rmc
> +debug: RMC_CFLAGS += -DDEBUG -g -O0
> +debug: rmc
> 
I missed your feedback of V1, just recap it here also with my comment:

- "Yup, the above will have the same effect as 'make debug'.
I thought that 'make debug' might be a convenient way to build a debug
binary? Do you think it makes sense to keep this extra target for
convenience since it doesn't affect the other usages of make?"

You could have to come back to CFLAGS when the a hard coded debug flags is not 
enough.

And, why pass -DDEBUG in RMC_CFLAGS when invoking gcc to compile rmc? I don’t 
see this macro DEBUG in the current rmc code.

Thanks
> $(ALL_OBJS): %.o: %.c
>       $(CC) -c $(CFLAGS) $(RMC_CFLAGS) $< -o $@
> -- 
> 2.11.1
> 

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to