From 248841d485647bf2981712aa22f8720e89eccf73 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 11 Nov 2014 22:05:42 -0800 Subject: Cleaned up Makefile. --- Makefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b383ec7..cbc2251 100644 --- a/Makefile +++ b/Makefile @@ -10,21 +10,26 @@ PROG?=$(BUILDDIR)/src/cmark .PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug -all: check - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Release; make +all: $(BUILDDIR) + @cmake --build $(BUILDDIR) || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1) -debug: check - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Debug; make +install: $(BUILDDIR) man/man1/cmark.1 + cmake --build $(BUILDDIR) --target install -install: check man/man1/cmark.1 - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Release; make install +$(BUILDDIR): + mkdir -p $(BUILDDIR); \ + cd $(BUILDDIR); \ + cmake .. -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) + +debug: + mkdir -p $(BUILDDIR); \ + cd $(BUILDDIR); \ + cmake .. -DCMAKE_BUILD_TYPE=Debug; \ + cmake --build . clean: rm -rf $(BUILDDIR) -check: - @cmake --version >/dev/null || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1) - $(PROG): all man/man1/cmark.1: man/cmark.1.md -- cgit v1.2.3