aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-05-06 16:56:32 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-06-02 11:18:47 +0200
commit8174a918ea3b7cb216bf7ea98cfdc10661b5c37d (patch)
tree0747ec3ccb9f8d7eeccfac35977fc17855ca3bbb /Makefile
parent8f52e8fc02dd235582f5961941bcd564e9a681cd (diff)
downloadallocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.tar.gz
allocbench-8174a918ea3b7cb216bf7ea98cfdc10661b5c37d.zip
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
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 96bc96c..f20c910 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
-PYTHONFILES = $(shell find src/ -name "*.py")
+SRCDIR = allocbench
-MAKEFILES = $(shell dirname $(shell find src/ -name Makefile))
-CMAKELISTS = $(shell dirname $(shell find src/ -name CMakeLists.txt))
+PYTHONFILES = $(shell find $(SRCDIR)/ -name "*.py")
+
+MAKEFILES = $(shell dirname $(shell find $(SRCDIR)/ -name Makefile))
+CMAKELISTS = $(shell dirname $(shell find $(SRCDIR)/ -name CMakeLists.txt))
OBJDIR = $(PWD)/build
@@ -22,7 +24,7 @@ export LDXXFLAGS = $(LDFLAGS) -static-libstdc++
all: $(OBJDIR)/ccinfo $(MAKEFILES) $(CMAKELISTS)
$(CMAKELISTS):
- $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/src//))
+ $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//))
@if test \( ! \( -d $(BENCHDIR) \) \) ;then mkdir -p $(BENCHDIR);fi
ifneq (,$(findstring s,$(MAKEFLAGS)))
cd $(BENCHDIR); cmake $(PWD)/$@ >/dev/null
@@ -32,9 +34,9 @@ endif
$(MAKE) -C $(BENCHDIR)
$(MAKEFILES):
- $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/src//))
+ $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//))
@if test \( ! \( -d $(BENCHDIR) \) \) ;then mkdir -p $(BENCHDIR);fi
- $(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/src//)
+ $(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/$(SRCDIR)//)
$(OBJDIR)/ccinfo: | $(OBJDIR)
$(CC) -v 2> $@