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

Stewart Smith stewart at linux.vnet.ibm.com
Mon Jul 17 19:13:58 AEST 2017


Signed-off-by: Stewart Smith <stewart at linux.vnet.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 $@
 
-- 
2.13.0



More information about the Skiboot mailing list