From 130765de719a3ddc475284e13749d09ff371a8e1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 1 Feb 2019 16:35:20 +0100 Subject: 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. --- src/benchmarks/larson/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/benchmarks/larson/Makefile (limited to 'src/benchmarks/larson/Makefile') 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) -- cgit v1.2.3