Add kelvin_core and fastvdma_core targets

These two targets are intended to be built via m4ci in Louhi and then
passed up to the airgapped bitstream build

Bypass-Presubmit-Reason: manually tested
Change-Id: Iadb6ef21e7d15d7f7952dc932a24d6a8272814c9
diff --git a/Makefile b/Makefile
index e7b9a26..56bca1a 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@
 include $(ROOTDIR)/build/cantrip_builtins.mk
 include $(ROOTDIR)/build/cantrip_sel4test.mk
 include $(ROOTDIR)/build/cantrip_tests.mk
+include $(ROOTDIR)/build/cores.mk
 include $(ROOTDIR)/build/minisel.mk
 include $(ROOTDIR)/build/verilator.mk
 
diff --git a/cores.mk b/cores.mk
new file mode 100644
index 0000000..8218d47
--- /dev/null
+++ b/cores.mk
@@ -0,0 +1,55 @@
+# Copyright 2024 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+KELVIN_CORE_SRC_DIR := $(ROOTDIR)/hw/kelvin
+KELVIN_CORE_OUT_DIR := $(OUT)/kelvin/hw/kelvin_core
+FASTVDMA_CORE_SRC_DIR := $(ROOTDIR)/hw/matcha
+FASTVDMA_CORE_OUT_DIR := $(OUT)/matcha/hw/fastvdma_core
+
+$(KELVIN_CORE_OUT_DIR):
+	mkdir -p "$(KELVIN_CORE_OUT_DIR)"
+
+$(FASTVDMA_CORE_OUT_DIR):
+	mkdir -p "$(FASTVDMA_CORE_OUT_DIR)"
+
+## Build kelvin system verilog core
+#
+# Used in the airgapped bitstream build
+kelvin_core: | $(KELVIN_CORE_OUT_DIR)
+	cd "$(KELVIN_CORE_SRC_DIR)" && \
+		bazel build //hdl/chisel:kelvin_core
+	cd "$(KELVIN_CORE_SRC_DIR)" && \
+		cp -rf bazel-bin/hdl/chisel/* $(KELVIN_CORE_OUT_DIR)
+
+## Clean kelvin core artifacts
+kelvin_core_clean:
+	rm -rf "$(KELVIN_CORE_OUT_DIR)"
+	cd "$(KELVIN_CORE_SRC_DIR)" && bazel clean --expunge
+
+## Build fastvdma system verilog core
+#
+# Used in the airgapped bitstream build
+fastvdma_core: | $(FASTVDMA_CORE_OUT_DIR)
+	cd "$(FASTVDMA_CORE_SRC_DIR)" && \
+		bazel build hw/ip/dma/chisel:fastvdma_core
+	cd "$(FASTVDMA_CORE_SRC_DIR)" && \
+		cp -rf bazel-bin/hw/ip/dma/chisel/* $(FASTVDMA_CORE_OUT_DIR)
+
+## Clean fastvdma core artifacts
+fastvdma_core_clean:
+	rm -rf "$(FASTVDMA_CORE_OUT_DIR)"
+	cd "$(FASTVDMA_CORE_SRC_DIR)" && bazel clean --expunge
+
+.PHONY:: kelvin_core kelvin_core_clean
+.PHONY:: fastvdma_core fastvdma_core_clean
\ No newline at end of file