aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-02-08 21:19:38 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-02-08 21:19:38 +0200
commitc035571d85e3d756804519d82de8b354f3910b29 (patch)
tree89714e13753d200d6e9a04f0d19d6dd1f7a55b2e /Makefile
downloadposthaste-c035571d85e3d756804519d82de8b354f3910b29.tar.gz
posthaste-c035571d85e3d756804519d82de8b354f3910b29.zip
project work phase 1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8dca080
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,62 @@
+.PHONY: all
+all: setup
+ $(MAKE) -f scripts/makefile
+
+# this kicks all unrecognised targets to the client script.
+# note that trying to compile individual files, e.g.
+#
+# make kernel.elf
+#
+# will not work, you would need
+#
+# make -f scripts/makefile kernel.elf
+#
+# instead
+.DEFAULT: setup
+ $(MAKE) -f scripts/makefile $<
+
+.PHONY:
+setup:
+ @echo -n > deps.mk
+ @./scripts/gen-deps -p POSTHASTE -c COMPILE_POSTHASTE -b posthaste \
+ "${POSTHASTE_SOURCES}"
+
+POSTHASTE_SOURCES :=
+
+CLEANUP := build deps.mk posthaste
+CLEANUP_CMD :=
+
+include src/source.mk
+
+.PHONY: format
+format:
+ find src include -iname '*.[ch]' |\
+ xargs uncrustify -c uncrustify.conf --no-backup -F -
+
+.PHONY: license
+license:
+ find src include -iname '*.[ch]' |\
+ xargs ./scripts/license
+
+.PHONY: docs
+docs:
+ find src include -iname '*.[ch]' -not -path */gen/* |\
+ xargs ./scripts/warn-undocumented
+ doxygen docs/doxygen.conf
+
+RM = rm
+
+.PHONY: clean
+clean:
+ $(RM) -rf $(CLEANUP)
+
+.PHONY: clean_run
+clean_run:
+ $(CLEANUP_CMD)
+
+.PHONY: clean_docs
+clean_docs:
+ $(RM) -rf docs/output
+
+.PHONY: clean_all
+clean_all: clean clean_run clean_docs