summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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