summaryrefslogtreecommitdiff
path: root/atos/arch/rv64/jh7110/Makefile
diff options
context:
space:
mode:
authorIan M. <ian@aptel.org>2026-09-18 02:22:24 +0000
committerIan M. <ian@aptel.org>2026-09-18 02:22:24 +0000
commitb93251d1661fe46fc4c02be7885675eaf3e90858 (patch)
treeb0b4ddfd52408da24c8a9f07aaffb31689ca283a /atos/arch/rv64/jh7110/Makefile
initial commitmain
Signed-off-by: Ian M. <ian@aptel.org>
Diffstat (limited to 'atos/arch/rv64/jh7110/Makefile')
-rw-r--r--atos/arch/rv64/jh7110/Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/atos/arch/rv64/jh7110/Makefile b/atos/arch/rv64/jh7110/Makefile
new file mode 100644
index 0000000..2e9f989
--- /dev/null
+++ b/atos/arch/rv64/jh7110/Makefile
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2026, Apollo Telephone Laboratories.
+# Provided under the BSD-3 clause.
+#
+
+include ../../../../mk/atos.mk
+
+ASMFILES = $(shell find . -name "*.S")
+ASMOFILES = $(ASMFILES:.S=.S.o)
+MISC_OFILES = $(shell find $(GLOBAL_ROOT)/atos -name "*.o")
+CFLAGS = $(INTERNAL_CFLAGS)
+
+KERNEL_ELF_OUT = $(GLOBAL_ROOT)/out/atos.sys
+KERNEL_BIN_OUT = $(GLOBAL_ROOT)/out/atos.bin
+
+.PHONY: all
+all: $(KERNEL_ELF_OUT)
+ $(PROMPT) "OBJCOPY" $(KERNEL_BIN_OUT)
+ $(OBJCOPY) -O binary $(KERNEL_ELF_OUT) $(KERNEL_BIN_OUT)
+
+.PHONY: $(KERNEL_ELF_OUT)
+$(KERNEL_ELF_OUT): $(ASMOFILES)
+ $(PROMPT) "LD" $(KERNEL_ELF_OUT)
+ $(LD) -Tdev/link.ld $(MISC_OFILES) -o $(KERNEL_ELF_OUT)
+
+%.S.o: %.S
+ $(PROMPT) "CC" $<
+ $(CC) -c $< $(CFLAGS) -o $@