A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10# Collect dummy C files in firmware/asm
11ASM_DUMMY_SRC := $(notdir $(call preprocess, $(FIRMDIR)/asm/SOURCES))
12
13# Get the corresponding real source files under firmware/asm/$ARCH (C or ASM)
14# strip arch_ prefix from $(ARCH)
15ASM_ARCH := $(subst arch_,,$(ARCH))
16ASM_C_SRC := $(addprefix $(FIRMDIR)/asm/$(ASM_ARCH)/,$(ASM_DUMMY_SRC))
17ASM_S_SRC := $(ASM_C_SRC:.c=.S)
18
19# ASM_SRC now contains only files that exist under $ARCH
20ASM_SRC := $(wildcard $(ASM_C_SRC))
21ASM_SRC += $(wildcard $(ASM_S_SRC))
22
23# GEN_SRC now contains a .c for each file in ASM_DUMMY_SRC that's not in ASM_SRC
24# I.e. fallback to a generic C source if no corresponding file in $ARCH is found
25GEN_SRC := $(filter-out $(notdir $(ASM_SRC:.S=.c)),$(ASM_DUMMY_SRC))
26GEN_SRC := $(addprefix $(FIRMDIR)/asm/,$(GEN_SRC))
27
28FIRMLIB_SRC += $(ASM_SRC)
29FIRMLIB_SRC += $(GEN_SRC)