Switch from Makefile to GN
GN makes it easier for us to have a modular build where we can define
tests and reuse code without having to hack on Makefiles. It also has
tools to analyze the build and comes with extensive documentation.
Change-Id: Ib28bc7b68d429e3c3193784c7a80d05ee35c6295
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..4c818a3
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,23 @@
+import("//build/image/hypervisor.gni")
+
+group("host_tools") {
+ deps = [
+ ":hafnium($arch_toolchain)",
+ ]
+}
+
+executable("test") {
+ sources = [
+ "test.cpp",
+ ]
+}
+
+# Only build the image for the arch
+if (current_toolchain == arch_toolchain) {
+ hypervisor("hafnium") {
+ deps = [
+ "//src",
+ "//src/arch/${arch}",
+ ]
+ }
+}