From 7c5f098511b8f612a17f4ccdd8a4924c325d37e1 Mon Sep 17 00:00:00 2001
From: Kimplul <kimi.h.kuparinen@gmail.com>
Date: Fri, 18 Oct 2024 22:35:27 +0300
Subject: initial parser+lexer

+ AST might still change, also not a *huge* fan of having to reverse
  all arrays but I guess it's unlikely to be a significant bottleneck
---
 Makefile | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Makefile

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..79a05da
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,65 @@
+.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: analyze
+analyze: setup
+	CC='gcc -fanalyzer' SKIP_ANALYZER='-fno-analyzer' $(MAKE) CROSS_COMPILE=
+
+.PHONY: setup
+setup:
+	@echo -n > deps.mk
+	@./scripts/gen-deps -p LYN -c COMPILE_LYN -b lyn "$(LYN_SOURCES)"
+
+CLEANUP		:= build deps.mk lyn
+CLEANUP_CMD	:=
+LYN_SOURCES	:=
+
+include src/source.mk
+
+.PHONY: check
+check: all
+	$(MAKE) -C tests -k check
+
+.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)
+	$(MAKE) -C tests clean
+
+.PHONY: clean_docs
+clean_docs:
+	$(RM) -rf docs/output
+
+.PHONY: clean_all
+clean_all: clean clean_docs
-- 
cgit v1.2.3