Bump version to 3.12
[maemo-rb.git] / firmware / asm / asm.make
blob9cd134ec5405bd056f504aa9d71276b502f0cd51
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 # Collect dummy C files in firmware/asm
11 ASM_DUMMY_SRC := $(notdir $(call preprocess, $(FIRMDIR)/asm/SOURCES))
13 # Get the corresponding real source files under firmware/asm/$ARCH (C or ASM)
14 # strip arch_ prefix from $(ARCH)
15 ASM_ARCH := $(subst arch_,,$(ARCH))
16 ASM_C_SRC := $(addprefix $(FIRMDIR)/asm/$(ASM_ARCH)/,$(ASM_DUMMY_SRC))
17 ASM_S_SRC := $(ASM_C_SRC:.c=.S)
19 # ASM_SRC now contains only files that exist under $ARCH
20 ASM_SRC := $(wildcard $(ASM_C_SRC))
21 ASM_SRC += $(wildcard $(ASM_S_SRC))
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
25 GEN_SRC := $(filter-out $(notdir $(ASM_SRC:.S=.c)),$(ASM_DUMMY_SRC))
26 GEN_SRC := $(addprefix $(FIRMDIR)/asm/,$(GEN_SRC))
28 FIRMLIB_SRC += $(ASM_SRC)
29 FIRMLIB_SRC += $(GEN_SRC)