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 ++++++++-- src/benchmarks/cfrac/Makefile | 10 ---------- src/benchmarks/espresso/Makefile | 10 ---------- 3 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 src/benchmarks/cfrac/Makefile delete mode 100644 src/benchmarks/espresso/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//) diff --git a/src/benchmarks/cfrac/Makefile b/src/benchmarks/cfrac/Makefile deleted file mode 100644 index 3c42b66..0000000 --- a/src/benchmarks/cfrac/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJDIR ?= obj - -.PHONY = all clean - -all: - cmake -S $(shell pwd) -B $(OBJDIR) - make -C $(OBJDIR) - -clean: - rm -rf $(OBJDIR) diff --git a/src/benchmarks/espresso/Makefile b/src/benchmarks/espresso/Makefile deleted file mode 100644 index 3c42b66..0000000 --- a/src/benchmarks/espresso/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJDIR ?= obj - -.PHONY = all clean - -all: - cmake -S $(shell pwd) -B $(OBJDIR) - make -C $(OBJDIR) - -clean: - rm -rf $(OBJDIR) -- cgit v1.2.3