[Skiboot] [PATCH 4/6] gard: enable building with -DDEBUG for ccan list

Cyril Bur cyrilbur at gmail.com
Tue Jul 18 14:25:50 AEST 2017


On Mon, 2017-07-17 at 19:13 +1000, Stewart Smith wrote:
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>

Reviewed-by: Cyril Bur <cyril.bur at au1.ibm.com>

> ---
>  external/gard/rules.mk | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/external/gard/rules.mk b/external/gard/rules.mk
> index c0b8a57f9658..a7b967aa6735 100644
> --- a/external/gard/rules.mk
> +++ b/external/gard/rules.mk
> @@ -5,7 +5,10 @@ OBJS      = version.o gard.o
>  LIBFLASH_FILES    := libflash.c libffs.c ecc.c blocklevel.c file.c
>  LIBFLASH_OBJS     := $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))
>  LIBFLASH_SRC      := $(addprefix libflash/,$(LIBFLASH_FILES))
> -OBJS     += $(LIBFLASH_OBJS)
> +CCAN_FILES	:= list.c
> +CCAN_OBJS	:= $(addprefix ccan-list-, $(CCAN_FILES:.c=.o))
> +CCAN_SRC	:= $(addprefix ccan/list/,$(CCAN_FILES))
> +OBJS     += $(LIBFLASH_OBJS) $(CCAN_OBJS)
>  OBJS     += common-arch_flash.o
>  EXE       = gard
>  
> @@ -29,10 +32,14 @@ version.c: .version
>  	$(CC) $(CFLAGS) -c $< -o $@
>  
>  $(LIBFLASH_SRC): | links
> +$(CCAN_SRC): | links
>  
>  $(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
>  	$(CC) $(CFLAGS) -c $< -o $@
>  
> +$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c
> +	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
> +
>  $(EXE): $(OBJS)
>  	$(CC) $(LDFLAGS) $(CFLAGS) $^ -o $@
>  


More information about the Skiboot mailing list