-# Hacky makefile to compile everything and run the tests in some kind of sane order.
-# V=--verbose for verbose tests.
-
-CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I.
-
-ALL=$(patsubst ccan/%/test, %, $(wildcard ccan/*/test))
-ALL_DIRS=$(patsubst %, ccan/%, $(ALL))
+# Hacky makefile to compile everything and run the tests in some kind
+# of sane order.
+
+# Main targets:
+#
+# check: run tests on all ccan modules (use 'make check V=--verbose' for more)
+# Includes building libccan.a.
+# libccan.a: A library with all the ccan modules in it.
+# tools: build useful tools in tools/ dir.
+# Especially tools/ccanlint/ccanlint and tools/namespacize.
+# distclean: destroy everything back to pristine state
+
+# Anything with an _info file is a module.
+ALL=$(patsubst ccan/%/_info, %, $(wildcard ccan/*/_info))