diff options
| author | Ian M. <ian@aptel.org> | 2026-09-18 02:22:24 +0000 |
|---|---|---|
| committer | Ian M. <ian@aptel.org> | 2026-09-18 02:22:24 +0000 |
| commit | b93251d1661fe46fc4c02be7885675eaf3e90858 (patch) | |
| tree | b0b4ddfd52408da24c8a9f07aaffb31689ca283a /mk/atos.mk | |
initial commitmain
Signed-off-by: Ian M. <ian@aptel.org>
Diffstat (limited to 'mk/atos.mk')
| -rw-r--r-- | mk/atos.mk | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mk/atos.mk b/mk/atos.mk new file mode 100644 index 0000000..fb5d98c --- /dev/null +++ b/mk/atos.mk @@ -0,0 +1,39 @@ +# +# Copyright (c) 2026, Apollo Telephone Laboratories. +# Provided under the BSD-3 clause. +# + +.SILENT: + +PROMPT = printf "%s\t\t%s\n" + +ifeq ($(CONFIG_ARCH),rv64) + CC_TARGET = riscv64-unknown-elf +else + CC_TARGET = +endif + +CC = \ + clang +LD = \ + ld.lld +OBJCOPY = \ + llvm-objcopy + +INTERNAL_CFLAGS = \ + -Wall \ + -pedantic \ + -MMD \ + -nostdlib \ + -nostdinc \ + -ffreestanding \ + -D_KERNEL \ + -D_ARCH='"$(CONFIG_ARCH)"' \ + -D_CHIP='"$(CONFIG_CHIP)"' \ + -target $(CC_TARGET) + +ifeq ($(CONFIG_ARCH),rv64) + INTERNAL_CFLAGS += \ + -mabi=lp64d \ + -mcmodel=medany +endif |
