From 3f0225c2dffc2c5cf6887cb93f44cf8a1dd888c3 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 2 Apr 2019 12:02:24 +0200 Subject: add real simple realloc benchmark --- src/benchmarks/realloc/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/benchmarks/realloc/Makefile (limited to 'src/benchmarks/realloc/Makefile') diff --git a/src/benchmarks/realloc/Makefile b/src/benchmarks/realloc/Makefile new file mode 100644 index 0000000..66b38ca --- /dev/null +++ b/src/benchmarks/realloc/Makefile @@ -0,0 +1,25 @@ +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)/realloc + +$(OBJDIR)/realloc: realloc.c | $(OBJDIR) + @echo compiling $@... + $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< + +$(OBJDIR): + mkdir -p $@ + +clean: + rm -rf $(OBJDIR) -- cgit v1.2.3