diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-01 16:35:20 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-01 16:35:20 +0100 |
| commit | 130765de719a3ddc475284e13749d09ff371a8e1 (patch) | |
| tree | c45ea8d47e53481022d641336ec2abd5cb588111 /src/benchmarks/loop/Makefile | |
| parent | 8221b8fb0e9ee491590932cd228f17b48155c0f7 (diff) | |
| download | allocbench-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/loop/Makefile')
| -rw-r--r-- | src/benchmarks/loop/Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/benchmarks/loop/Makefile b/src/benchmarks/loop/Makefile new file mode 100644 index 0000000..89914b2 --- /dev/null +++ b/src/benchmarks/loop/Makefile @@ -0,0 +1,24 @@ +OBJDIR ?= obj + +CC ?= gcc + +WARNFLAGS ?= -Wall -Wextra +COMMONFLAGS ?= -fno-builtin -fPIC -DPIC -pthread +OPTFLAGS ?= -O3 -DNDEBUG + +CFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(COMMONFLAGS) + +LDFLAGS ?= -pthread -static-libgcc + +.PHONY = all clean + +all: $(OBJDIR)/loop + +$(OBJDIR)/loop: loop.c | $(OBJDIR) + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< + +$(OBJDIR): + mkdir $@ + +clean: + rm -rf $(OBJDIR) |
