From 3998a3155b54c2e25ed059a292de8b1bdf9ca203 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 25 Aug 2019 00:07:02 +0200 Subject: integrate cmake projects into the root Makefile --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') 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//) -- cgit v1.2.3