1
2CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE
3LDFLAGS += -lpthread -lurcu
4TARGETS = main
5OFILES = 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 \
7	 iteration_check.o benchmark.o
8
9ifdef BENCHMARK
10	CFLAGS += -DBENCHMARK=1
11endif
12
13targets: $(TARGETS)
14
15main:	$(OFILES)
16	$(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) -o main
17
18clean:
19	$(RM) -f $(TARGETS) *.o radix-tree.c
20
21vpath %.c ../../lib
22
23$(OFILES): *.h */*.h \
24	../../include/linux/*.h \
25	../../include/asm/*.h \
26	../../../include/linux/radix-tree.h \
27	../../../include/linux/idr.h
28
29radix-tree.c: ../../../lib/radix-tree.c
30	sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
31
32idr.c: ../../../lib/idr.c
33	sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
34