diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-11-11 22:05:42 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-11-11 22:05:42 -0800 |
commit | 248841d485647bf2981712aa22f8720e89eccf73 (patch) | |
tree | cf3cf9aeb75d312ea65cdde3c5bcbb3e9f9db43d | |
parent | 40a47312895bcc00175d4204fd3ec522199a0a84 (diff) |
Cleaned up Makefile.
-rw-r--r-- | Makefile | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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 |