Redo r28026 so that all .S files get the __ASSEMBLER__ define.
Patch by Thomas Jarosch. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28913 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6cbacb1b3e
commit
0bf1bd1d51
8 changed files with 11 additions and 15 deletions
|
@ -109,7 +109,7 @@ $(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.c
|
||||||
$(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S
|
$(CODECDIR)/%.o: $(ROOTDIR)/apps/codecs/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \
|
||||||
-I$(dir $<) $(CODECFLAGS) -c $< -o $@
|
-I$(dir $<) $(CODECFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
ifdef APP_TYPE
|
ifdef APP_TYPE
|
||||||
CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
|
CODECLDFLAGS = $(SHARED_FLAG) # <-- from Makefile
|
||||||
|
|
|
@ -24,11 +24,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* workaround gcc 3.4.6 -std=gnu99 */
|
|
||||||
#ifndef __ASSEMBLER__
|
|
||||||
#define __ASSEMBLER__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "demac_config.h"
|
#include "demac_config.h"
|
||||||
|
|
||||||
/* NOTE: The following need to be kept in sync with parser.h */
|
/* NOTE: The following need to be kept in sync with parser.h */
|
||||||
|
|
|
@ -53,7 +53,7 @@ $(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.c
|
||||||
$(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.S
|
$(CODECDIR)/libmad-mpeg/%.o : $(ROOTDIR)/apps/codecs/libmad/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
|
||||||
$(CC) $(MPEGMADFLAGS) -c $< -o $@
|
$(CC) $(MPEGMADFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.c
|
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.c
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
|
@ -63,4 +63,4 @@ $(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.c
|
||||||
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.S
|
$(CODECDIR)/libmad/%.o: $(ROOTDIR)/apps/codecs/libmad/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<)) \
|
||||||
$(CC) $(MADFLAGS) -c $< -o $@
|
$(CC) $(MADFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -52,7 +52,7 @@ $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c
|
||||||
|
|
||||||
$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S
|
$(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c
|
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
|
@ -60,4 +60,4 @@ $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c
|
||||||
|
|
||||||
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S
|
$(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -31,4 +31,4 @@ $(CODECDIR)/libtta/%.o: $(ROOTDIR)/apps/codecs/libtta/%.c
|
||||||
|
|
||||||
$(CODECDIR)/libtta/%.o: $(ROOTDIR)/apps/codecs/libtta/%.S
|
$(CODECDIR)/libtta/%.o: $(ROOTDIR)/apps/codecs/libtta/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(TTAFLAGS) -c $< -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(TTAFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
|
@ -19,7 +19,7 @@ OBJS= ../../crt0.o ../../system.o main.o ../../panic.o ../../drivers/lcd.o \
|
||||||
../../debug.o ../../common/sprintf.o
|
../../debug.o ../../common/sprintf.o
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
|
$(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) $(ASMFLAGS) -c $<
|
||||||
|
|
||||||
|
|
||||||
all : archos.mod
|
all : archos.mod
|
||||||
|
|
|
@ -11,7 +11,7 @@ $(OBJDIR)/%.o: %.c
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.S
|
$(OBJDIR)/%.o: %.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $<)$(CC) $(CFLAGS) -c $< -o $@
|
$(call PRINTS,CC $<)$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# The echo stuff last in the dep update shell magic is to prevent any compiler
|
# The echo stuff last in the dep update shell magic is to prevent any compiler
|
||||||
# errors/warnings to cause an error code to get returned and thus stop the
|
# errors/warnings to cause an error code to get returned and thus stop the
|
||||||
|
|
|
@ -16,6 +16,7 @@ INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
|
||||||
|
|
||||||
CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
|
CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
|
||||||
PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
|
PPCFLAGS = $(filter-out -g -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
|
||||||
|
ASMFLAGS = -D__ASSEMBLER__ # work around gcc 3.4.x bug with -std=gnu99, only meant for .S files
|
||||||
|
|
||||||
TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
|
TOOLS = $(TOOLSDIR)/rdf2binary $(TOOLSDIR)/convbdf \
|
||||||
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
|
$(TOOLSDIR)/codepages $(TOOLSDIR)/scramble $(TOOLSDIR)/bmp2rb \
|
||||||
|
@ -343,7 +344,7 @@ $(BUILDDIR)/%.o: $(ROOTDIR)/%.c
|
||||||
|
|
||||||
$(BUILDDIR)/%.o: $(ROOTDIR)/%.S
|
$(BUILDDIR)/%.o: $(ROOTDIR)/%.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# generated definitions for use in .S files
|
# generated definitions for use in .S files
|
||||||
$(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
|
$(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
|
||||||
|
@ -358,7 +359,7 @@ $(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(SILENT)mkdir -p $(dir $@)
|
$(SILENT)mkdir -p $(dir $@)
|
||||||
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) $(ASMFLAGS) -c $< -o $@
|
||||||
|
|
||||||
Makefile: $(TOOLSDIR)/configure
|
Makefile: $(TOOLSDIR)/configure
|
||||||
ifneq (reconf,$(MAKECMDGOALS))
|
ifneq (reconf,$(MAKECMDGOALS))
|
||||||
|
|
Loading…
Reference in a new issue