From 668a769ca4cabdfee54dc53e92a964c32c9738d7 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Mon, 13 Jul 2009 00:40:35 +0000 Subject: Add new asmdefs mechanism for exporting information only available to the C compiler for use in asm files, and use it in arm jpeg idct. See apps/apps.make, apps/core_asmdefs.c, and apps/recorder/jpeg_idct_arm.S for details. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21831 a1c6a512-1295-4272-9138-f99709370657 --- tools/functions.make | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/functions.make') diff --git a/tools/functions.make b/tools/functions.make index 66354ebc18..ba444267c4 100644 --- a/tools/functions.make +++ b/tools/functions.make @@ -25,6 +25,9 @@ preprocess = $(shell $(CC) $(PPCFLAGS) $(2) -E -P -x c -include config.h $(1) | preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \ grep -v '^\#' | grep -v "^$$" > $(2)) +asmdefs2file = $(shell $(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \ + perl -ne 'if(/^AD_(\w+):$$/){$$var=$$1}else{/^\W\.word\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $2) + c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) # calculate dependencies for a list of source files $(2) and output them @@ -32,6 +35,7 @@ c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) mkdepfile = $(shell \ $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ sed -e "s: lang.h: lang/lang_core.o:" \ + -e 's:_asmdefs.o:_asmdefs.h:' \ -e "s: max_language_size.h: lang/max_language_size.h:" | \ $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) \ >> $(1)_) -- cgit v1.2.3