1CFLAGS += -I. -I../../include -g -O2 -Wall -fsanitize=address 2LDFLAGS += -fsanitize=address -fsanitize=undefined 3TARGETS = main 4OFILES = main.o scatterlist.o 5 6ifeq ($(BUILD), 32) 7 CFLAGS += -m32 8 LDFLAGS += -m32 9endif 10 11targets: include $(TARGETS) 12 13main: $(OFILES) 14 15clean: 16 $(RM) $(TARGETS) $(OFILES) scatterlist.c linux/scatterlist.h linux/highmem.h linux/kmemleak.h asm/io.h 17 @rmdir asm 18 19scatterlist.c: ../../../lib/scatterlist.c 20 @sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@ 21 22.PHONY: include 23 24include: ../../../include/linux/scatterlist.h 25 @mkdir -p linux 26 @mkdir -p asm 27 @touch asm/io.h 28 @touch linux/highmem.h 29 @touch linux/kmemleak.h 30 @cp $< linux/scatterlist.h 31