aboutsummaryrefslogtreecommitdiff
path: root/src/benchmarks/larson/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-02-01 16:35:20 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-02-01 16:35:20 +0100
commit130765de719a3ddc475284e13749d09ff371a8e1 (patch)
treec45ea8d47e53481022d641336ec2abd5cb588111 /src/benchmarks/larson/Makefile
parent8221b8fb0e9ee491590932cd228f17b48155c0f7 (diff)
downloadallocbench-130765de719a3ddc475284e13749d09ff371a8e1.tar.gz
allocbench-130765de719a3ddc475284e13749d09ff371a8e1.zip
rework build system #1
each benchmark has its own Makefile which must put it's binaries into OBJDIR which is added to the PATH during execution.
Diffstat (limited to 'src/benchmarks/larson/Makefile')
-rw-r--r--src/benchmarks/larson/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/benchmarks/larson/Makefile b/src/benchmarks/larson/Makefile
new file mode 100644
index 0000000..9ccce9f
--- /dev/null
+++ b/src/benchmarks/larson/Makefile
@@ -0,0 +1,24 @@
+OBJDIR ?= obj
+
+CXX ?= g++
+
+WARNFLAGS ?= -Wall -Wextra
+COMMONFLAGS ?= -fno-builtin -fPIC -DPIC -pthread
+OPTFLAGS ?= -O3 -DNDEBUG
+
+CXXFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(COMMONFLAGS)
+
+LDXXFLAGS ?= -pthread -static-libgcc -static-libstdc++
+
+.PHONY: all clean
+
+all: $(OBJDIR)/larson
+
+$(OBJDIR)/larson: larson.cc | $(OBJDIR)
+ $(CXX) $(LDXXFLAGS) $(CXXFLAGS) -o $@ $<
+
+$(OBJDIR):
+ mkdir $@
+
+clean:
+ rm -rf $(OBJDIR)