2016-03-18 05:21:45 +08:00
|
|
|
|
2016-12-15 07:07:56 +08:00
|
|
|
CFLAGS += -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE
|
2016-03-18 05:21:45 +08:00
|
|
|
LDFLAGS += -lpthread -lurcu
|
|
|
|
TARGETS = main
|
2016-12-20 23:27:56 +08:00
|
|
|
OFILES = main.o radix-tree.o idr.o linux.o test.o tag_check.o find_bit.o \
|
|
|
|
regression1.o regression2.o regression3.o multiorder.o idr-test.o \
|
2016-12-15 07:08:14 +08:00
|
|
|
iteration_check.o benchmark.o
|
|
|
|
|
|
|
|
ifdef BENCHMARK
|
|
|
|
CFLAGS += -DBENCHMARK=1
|
|
|
|
endif
|
2016-03-18 05:21:45 +08:00
|
|
|
|
|
|
|
targets: $(TARGETS)
|
|
|
|
|
|
|
|
main: $(OFILES)
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OFILES) -o main
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) -f $(TARGETS) *.o radix-tree.c
|
|
|
|
|
2016-12-29 11:53:46 +08:00
|
|
|
vpath %.c ../../lib
|
2016-12-15 07:08:29 +08:00
|
|
|
|
|
|
|
$(OFILES): *.h */*.h \
|
|
|
|
../../include/linux/*.h \
|
2016-12-20 00:09:34 +08:00
|
|
|
../../include/asm/*.h \
|
2016-12-20 23:27:56 +08:00
|
|
|
../../../include/linux/radix-tree.h \
|
|
|
|
../../../include/linux/idr.h
|
2016-03-18 05:21:45 +08:00
|
|
|
|
|
|
|
radix-tree.c: ../../../lib/radix-tree.c
|
|
|
|
sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
|
2016-12-20 23:27:56 +08:00
|
|
|
|
|
|
|
idr.c: ../../../lib/idr.c
|
|
|
|
sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < $< > $@
|