diff --git a/Makefile b/Makefile
index f0a392c80f713ade6865170fe572aa5bc0088f62..bb9c6d190be0f220b0375b5cda3a85f7a5c99289 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,10 @@
-# Makefile originally taken from coq-club
+# Determine Coq version
+COQ_VERSION=$(shell coqc --version | egrep -o 'version 8.[0-9]' | egrep -o '8.[0-9]')
+COQ_MAKEFILE_FLAGS ?=
+
+ifeq ($(COQ_VERSION), 8.6)
+	COQ_MAKEFILE_FLAGS += -arg -w -arg -notation-overridden,-redundant-canonical-projection
+endif
 
 %: Makefile.coq phony
 	+@make -f Makefile.coq $@
@@ -11,7 +17,7 @@ clean: Makefile.coq
 	rm -f Makefile.coq
 
 Makefile.coq: _CoqProject Makefile
-	coq_makefile -f _CoqProject | sed 's/$$(COQCHK) $$(COQCHKFLAGS) $$(COQLIBS)/$$(COQCHK) $$(COQCHKFLAGS) $$(subst -Q,-R,$$(COQLIBS))/' \
+	coq_makefile $(COQ_MAKEFILE_FLAGS) -f _CoqProject | sed 's/$$(COQCHK) $$(COQCHKFLAGS) $$(COQLIBS)/$$(COQCHK) $$(COQCHKFLAGS) $$(subst -Q,-R,$$(COQLIBS))/' \
 	  | sed '/^install:$$/a \\tif [ -d "$$(DSTROOT)"$$(COQLIBINSTALL)/iris/ ]; then find "$$(DSTROOT)"$$(COQLIBINSTALL)/iris/ -name "*.vo" -print -delete; fi' > Makefile.coq
 
 _CoqProject: ;