blob: c65233876622f51d9f7acabfb41343abed702855 [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Tvrtko Ursulinc9636242017-09-06 15:55:06 +01002CFLAGS += -I. -I../../include -g -O2 -Wall -fsanitize=address
3LDFLAGS += -fsanitize=address -fsanitize=undefined
4TARGETS = main
5OFILES = main.o scatterlist.o
6
7ifeq ($(BUILD), 32)
8 CFLAGS += -m32
9 LDFLAGS += -m32
10endif
11
12targets: include $(TARGETS)
13
14main: $(OFILES)
15
16clean:
Tvrtko Ursulinefc5b2e2020-10-04 18:43:38 +030017 $(RM) $(TARGETS) $(OFILES) scatterlist.c linux/scatterlist.h linux/highmem.h linux/kmemleak.h linux/slab.h asm/io.h
Tvrtko Ursulinc9636242017-09-06 15:55:06 +010018 @rmdir asm
19
20scatterlist.c: ../../../lib/scatterlist.c
21 @sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
22
23.PHONY: include
24
25include: ../../../include/linux/scatterlist.h
26 @mkdir -p linux
27 @mkdir -p asm
28 @touch asm/io.h
29 @touch linux/highmem.h
30 @touch linux/kmemleak.h
Tvrtko Ursulinefc5b2e2020-10-04 18:43:38 +030031 @touch linux/slab.h
Tvrtko Ursulinc9636242017-09-06 15:55:06 +010032 @cp $< linux/scatterlist.h