aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-11 22:05:42 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-11 22:05:42 -0800
commit248841d485647bf2981712aa22f8720e89eccf73 (patch)
treecf3cf9aeb75d312ea65cdde3c5bcbb3e9f9db43d /Makefile
parent40a47312895bcc00175d4204fd3ec522199a0a84 (diff)
Cleaned up Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 14 insertions, 9 deletions
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