aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2018-07-24 11:09:34 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2018-07-24 11:09:34 +0200
commitfce50c833496d8c07a1d189807d81be15875431c (patch)
tree5fff7ef00ec8476991e68221ee96f121873d4cf5 /Makefile
parent05c3559e2dfd015b2e7f2deca7aa9f1692c84ecb (diff)
downloadallocbench-fce50c833496d8c07a1d189807d81be15875431c.tar.gz
allocbench-fce50c833496d8c07a1d189807d81be15875431c.zip
move c benchmarks in benchmarks subdir
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c515149..c7da232 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,9 @@
.DEFAULT_GOAL = all
-C_SOURCES = $(shell find . -name "*.c")
-CC_SOURCES = $(shell find . -name "*.cc")
+SRCDIR=benchmarks
+C_SOURCES = $(shell find $(SRCDIR) -name "*.c")
+CC_SOURCES = $(shell find $(SRCDIR) -name "*.cc")
VERBOSE =
OBJDIR = ./build
@@ -26,11 +27,19 @@ OBJECTS = $(notdir $(CC_SOURCES:.cc=.o)) $(notdir $(C_SOURCES:.c=.o))
OBJPRE = $(addprefix $(OBJDIR)/,$(OBJECTS))
MAKEFILE_LIST = Makefile
-all: $(OBJDIR)/bench_loop $(OBJDIR)/bench_conprod
+TARGETS = $(OBJPRE:.o=)
-bench: all
- @if test \( ! \( -d bench.d \) \) ;then mkdir -p bench.d;fi
- bash -c "./bench.py"
+all: $(TARGETS)
+
+$(OBJDIR)/cache-thrash: $(OBJDIR)/cache-thrash.o
+ @echo "ld $@"
+ @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi
+ $(VERBOSE) $(CXX) -pthread -o $@ $^
+
+$(OBJDIR)/cache-scratch: $(OBJDIR)/cache-scratch.o
+ @echo "ld $@"
+ @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi
+ $(VERBOSE) $(CXX) -pthread -o $@ $^
$(OBJDIR)/bench_conprod: $(OBJDIR)/bench_conprod.o
@echo "ld $@"