blob: 3597a3a9f269e75ceb396874fecc264b30dcdf6c [file] [log] [blame]
Matthew Wilcox1366c372016-03-17 14:21:45 -07001
Matthew Wilcoxebb9a9a2016-12-14 15:07:56 -08002CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE
Matthew Wilcox1366c372016-03-17 14:21:45 -07003LDFLAGS += -lpthread -lurcu
4TARGETS = main
Matthew Wilcox0a835c42016-12-20 10:27:56 -05005OFILES = 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 Khlebnikovcfa40bc2016-12-14 15:08:14 -08007 iteration_check.o benchmark.o
8
9ifdef BENCHMARK
10 CFLAGS += -DBENCHMARK=1
11endif
Matthew Wilcox1366c372016-03-17 14:21:45 -070012
13targets: $(TARGETS)
14
15main: $(OFILES)
16 $(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) -o main
17
18clean:
19 $(RM) -f $(TARGETS) *.o radix-tree.c
20
Matthew Wilcox991af732016-12-28 22:53:46 -050021vpath %.c ../../lib
Matthew Wilcox06295732016-12-14 15:08:29 -080022
23$(OFILES): *.h */*.h \
24 ../../include/linux/*.h \
Matthew Wilcox43a30c22016-12-19 11:09:34 -050025 ../../include/asm/*.h \
Matthew Wilcox0a835c42016-12-20 10:27:56 -050026 ../../../include/linux/radix-tree.h \
27 ../../../include/linux/idr.h
Matthew Wilcox1366c372016-03-17 14:21:45 -070028
29radix-tree.c: ../../../lib/radix-tree.c
30 sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
Matthew Wilcox0a835c42016-12-20 10:27:56 -050031
32idr.c: ../../../lib/idr.c
33 sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@