pflash: include ccan/list/list.c to be able to build -DDEBUG
This enables some extra linked list checking
@@ -4,8 +4,11 @@ override CFLAGS += -O2 -Wall -I.
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))
+CCAN_FILES := list.c
+CCAN_OBJS := $(addprefix ccan-list-, $(CCAN_FILES:.c=.o))
+CCAN_SRC := $(addprefix ccan/list/,$(CCAN_FILES))
PFLASH_OBJS := pflash.o progress.o version.o common-arch_flash.o
-OBJS := $(PFLASH_OBJS) $(LIBFLASH_OBJS)
+OBJS := $(PFLASH_OBJS) $(LIBFLASH_OBJS) $(CCAN_OBJS)
EXE := pflash
sbindir ?= /usr/sbin
@@ -37,9 +40,14 @@ version.c: .version
$(LIBFLASH_SRC): | links
+$(CCAN_SRC): | links
+
$(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
+$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c
+ $(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
+
$(EXE): $(OBJS)
$(Q_CC)$(CC) $(LDFLAGS) $(CFLAGS) $^ -lrt -o $@
