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