From 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 May 2020 16:56:32 +0200 Subject: make the whole project more python idiomatic * rename src directory to allocbench * make global variable names UPPERCASE * format a lot of code using yapf * use lowercase ld_preload and ld_library_path as Allocator members * name expected Errors 'err' and don't raise a new Exception * disable some pylint messages --- src/Makefile | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/Makefile (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index caceb19..0000000 --- a/src/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -OBJDIR ?= obj - -CC ?= gcc - -WARNFLAGS ?= -Wall -Wextra -COMMONFLAGS ?= -fno-builtin -fPIC -DPIC -pthread -OPTFLAGS ?= -O0 -g - -CFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(COMMONFLAGS) - -LDFLAGS ?= -pthread -static-libgcc - -MEMSIZE_KB=$(shell free -t | tail -1 | tr -s ' ' | cut -d ' ' -f 2) -MEMSIZE="$(MEMSIZE_KB) * 1024l" - -TOOLS = print_status_on_exit.so exec sig_handlers.so -ALLOCS = bumpptr_alloc.so align_to_cl.so -TARGETS = $(addprefix $(OBJDIR)/allocators/,$(ALLOCS)) $(addprefix $(OBJDIR)/,$(TOOLS)) - -.PHONY: all clean - -all: $(TARGETS) - -$(OBJDIR)/allocators/bumpptr_alloc.so: bumpptr_alloc.c malloc.c Makefile - @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(CC) $(LDFLAGS) -shared -DMEMSIZE=$(MEMSIZE) $(CFLAGS) -o $@ bumpptr_alloc.c malloc.c - -$(OBJDIR)/allocators/align_to_cl.so: align_to_cl.c Makefile - @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< -ldl - -$(OBJDIR)/print_status_on_exit.so: print_status_on_exit.c Makefile - @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< - -$(OBJDIR)/sig_handlers.so: sig_handlers.c Makefile - @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< - -$(OBJDIR)/exec: exec.c Makefile - @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< - -clean: - rm -rf $(OBJDIR) -- cgit v1.2.3