mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
make: remove asm.make and use asm/SOURCES directly
asm.make replaces source files listed in asm/SOURCES with
a corresponding .c or .S file under firmware/asm/${ARCH}.
This makes it difficult to handle differences within one
architecture, eg. different instruction sets or versions
of the architecture.
Get rid of asm.make, and instead use the preprocessor to
select the architecture-specific sources directly from
asm/SOURCES. This is slightly more verbose but is more
flexible.
Change-Id: Id2a484794d5d951b7ba7b54a552de6960414fa45
This commit is contained in:
parent
e2196c4566
commit
6f4b6a8078
3 changed files with 36 additions and 31 deletions
|
|
@ -1,11 +1,41 @@
|
||||||
|
#if defined(CPU_ARM)
|
||||||
|
arm/ffs.S
|
||||||
|
arm/memset16.S
|
||||||
|
#elif defined(CPU_MIPS)
|
||||||
|
mips/ffs.S
|
||||||
|
memset16.c
|
||||||
|
#elif defined(CPU_COLDFIRE)
|
||||||
|
m68k/ffs.S
|
||||||
|
m68k/memset16.S
|
||||||
|
#else
|
||||||
ffs.c
|
ffs.c
|
||||||
memset16.c
|
memset16.c
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(HAVE_ROCKBOX_C_LIBRARY)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(HAVE_ROCKBOX_C_LIBRARY)
|
||||||
|
#if defined(CPU_ARM)
|
||||||
|
arm/memcpy.S
|
||||||
|
arm/memmove.S
|
||||||
|
arm/memset.S
|
||||||
|
strlen.c
|
||||||
|
#elif defined(CPU_MIPS)
|
||||||
|
mips/memcpy.S
|
||||||
|
memmove.c
|
||||||
|
mips/memset.S
|
||||||
|
strlen.c
|
||||||
|
#elif defined(CPU_COLDFIRE)
|
||||||
|
m68k/memcpy.S
|
||||||
|
m68k/memmove.S
|
||||||
|
m68k/memset.S
|
||||||
|
m68k/strlen.S
|
||||||
|
#else
|
||||||
memcpy.c
|
memcpy.c
|
||||||
|
mempcpy.c
|
||||||
memmove.c
|
memmove.c
|
||||||
memset.c
|
memset.c
|
||||||
strlen.c
|
strlen.c
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) || defined(APPLICATION)
|
#if defined(WIN32) || defined(APPLICATION)
|
||||||
mempcpy.c
|
mempcpy.c
|
||||||
|
|
@ -21,6 +51,10 @@ mempcpy.c
|
||||||
#if LCD_DEPTH >= 24
|
#if LCD_DEPTH >= 24
|
||||||
lcd-as-memframe-24bit.c
|
lcd-as-memframe-24bit.c
|
||||||
#else
|
#else
|
||||||
|
#if defined(CPU_ARM)
|
||||||
|
arm/lcd-as-memframe.S
|
||||||
|
#else
|
||||||
lcd-as-memframe.c
|
lcd-as-memframe.c
|
||||||
#endif
|
#endif /* CPU_ARM */
|
||||||
|
#endif /* LCD_DEPTH */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
# __________ __ ___.
|
|
||||||
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
||||||
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
||||||
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
||||||
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
||||||
# \/ \/ \/ \/ \/
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
# Collect dummy C files in firmware/asm
|
|
||||||
ASM_DUMMY_SRC := $(notdir $(call preprocess, $(FIRMDIR)/asm/SOURCES))
|
|
||||||
|
|
||||||
# Get the corresponding real source files under firmware/asm/$ARCH (C or ASM)
|
|
||||||
# strip arch_ prefix from $(ARCH)
|
|
||||||
ASM_ARCH := $(subst arch_,,$(ARCH))
|
|
||||||
ASM_C_SRC := $(addprefix $(FIRMDIR)/asm/$(ASM_ARCH)/,$(ASM_DUMMY_SRC))
|
|
||||||
ASM_S_SRC := $(ASM_C_SRC:.c=.S)
|
|
||||||
|
|
||||||
# ASM_SRC now contains only files that exist under $ARCH
|
|
||||||
ASM_SRC := $(wildcard $(ASM_C_SRC))
|
|
||||||
ASM_SRC += $(wildcard $(ASM_S_SRC))
|
|
||||||
|
|
||||||
# GEN_SRC now contains a .c for each file in ASM_DUMMY_SRC that's not in ASM_SRC
|
|
||||||
# I.e. fallback to a generic C source if no corresponding file in $ARCH is found
|
|
||||||
GEN_SRC := $(filter-out $(notdir $(ASM_SRC:.S=.c)),$(ASM_DUMMY_SRC))
|
|
||||||
GEN_SRC := $(addprefix $(FIRMDIR)/asm/,$(GEN_SRC))
|
|
||||||
|
|
||||||
FIRMLIB_SRC += $(ASM_SRC)
|
|
||||||
FIRMLIB_SRC += $(GEN_SRC)
|
|
||||||
|
|
@ -13,11 +13,11 @@ ifndef APP_TYPE
|
||||||
INCLUDES += -I$(FIRMDIR)/libc/include
|
INCLUDES += -I$(FIRMDIR)/libc/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(FIRMDIR)/asm/asm.make
|
|
||||||
ifneq ($(filter reggen,$(TOOLSET)),)
|
ifneq ($(filter reggen,$(TOOLSET)),)
|
||||||
include $(FIRMDIR)/reggen/reggen.make
|
include $(FIRMDIR)/reggen/reggen.make
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/asm/SOURCES)
|
||||||
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
|
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
|
||||||
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
||||||
FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
|
FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue