aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-08-25 00:07:02 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-08-25 00:07:02 +0200
commit3998a3155b54c2e25ed059a292de8b1bdf9ca203 (patch)
treead8ade82b8df390262dd9226a78f7f09dbc0479d /Makefile
parent110bcf125084808a959d3d84c5593caee1ac5555 (diff)
downloadallocbench-3998a3155b54c2e25ed059a292de8b1bdf9ca203.tar.gz
allocbench-3998a3155b54c2e25ed059a292de8b1bdf9ca203.zip
integrate cmake projects into the root Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2e1a758..dad9f4c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
MAKEFILES = $(shell dirname $(shell find . -name Makefile ! -path ./Makefile ! -path "./build/*"))
+CMAKELISTS = $(shell dirname $(shell find . -name CMakeLists.txt ! -path "./build/*"))
OBJDIR = $(PWD)/build
@@ -15,8 +16,13 @@ export CXXFLAGS = -std=c++11 $(CFLAGS) -fno-exceptions
export LDFLAGS = -pthread -static-libgcc
export LDXXFLAGS = $(LDFLAGS) -static-libstdc++
-.PHONY: all clean pylint $(MAKEFILES)
-all: $(OBJDIR)/ccinfo $(MAKEFILES)
+.PHONY: all clean pylint $(MAKEFILES) $(CMAKELISTS)
+all: $(OBJDIR)/ccinfo $(MAKEFILES) $(CMAKELISTS)
+
+$(CMAKELISTS):
+ $(eval BENCHDIR=$(OBJDIR)$(shell echo $@ | sed s/src//))
+ @if test \( ! \( -d $(BENCHDIR) \) \) ;then mkdir -p $(BENCHDIR);fi
+ cd $(BENCHDIR); cmake $(PWD)/$@; make
$(MAKEFILES):
$(MAKE) -C $@ OBJDIR=$(OBJDIR)$(shell echo $@ | sed s/src//)