Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 1 | |
Matthew Wilcox | ebb9a9a | 2016-12-14 15:07:56 -0800 | [diff] [blame] | 2 | CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 3 | LDFLAGS += -lpthread -lurcu |
| 4 | TARGETS = main |
Matthew Wilcox | 0a835c4 | 2016-12-20 10:27:56 -0500 | [diff] [blame] | 5 | OFILES = main.o radix-tree.o idr.o linux.o test.o tag_check.o find_bit.o \ |
| 6 | regression1.o regression2.o regression3.o multiorder.o idr-test.o \ |
Konstantin Khlebnikov | cfa40bc | 2016-12-14 15:08:14 -0800 | [diff] [blame] | 7 | iteration_check.o benchmark.o |
| 8 | |
| 9 | ifdef BENCHMARK |
| 10 | CFLAGS += -DBENCHMARK=1 |
| 11 | endif |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 12 | |
| 13 | targets: $(TARGETS) |
| 14 | |
| 15 | main: $(OFILES) |
| 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) -o main |
| 17 | |
| 18 | clean: |
| 19 | $(RM) -f $(TARGETS) *.o radix-tree.c |
| 20 | |
Matthew Wilcox | 991af73 | 2016-12-28 22:53:46 -0500 | [diff] [blame] | 21 | vpath %.c ../../lib |
Matthew Wilcox | 0629573 | 2016-12-14 15:08:29 -0800 | [diff] [blame] | 22 | |
| 23 | $(OFILES): *.h */*.h \ |
| 24 | ../../include/linux/*.h \ |
Matthew Wilcox | 43a30c2 | 2016-12-19 11:09:34 -0500 | [diff] [blame] | 25 | ../../include/asm/*.h \ |
Matthew Wilcox | 0a835c4 | 2016-12-20 10:27:56 -0500 | [diff] [blame] | 26 | ../../../include/linux/radix-tree.h \ |
| 27 | ../../../include/linux/idr.h |
Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 28 | |
| 29 | radix-tree.c: ../../../lib/radix-tree.c |
| 30 | sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@ |
Matthew Wilcox | 0a835c4 | 2016-12-20 10:27:56 -0500 | [diff] [blame] | 31 | |
| 32 | idr.c: ../../../lib/idr.c |
| 33 | sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@ |