diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-07-13 00:40:35 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-07-13 00:40:35 +0000 |
commit | 668a769ca4cabdfee54dc53e92a964c32c9738d7 (patch) | |
tree | a4c42168e4b86d4b7e09533307ae070fd3c7bcc0 /tools/functions.make | |
parent | 36eeecbe9a91a5da8bd82ee3974c359f4534dd14 (diff) | |
download | rockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.tar.gz rockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.tar.bz2 rockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.zip |
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
Diffstat (limited to 'tools/functions.make')
-rw-r--r-- | tools/functions.make | 4 |
1 files changed, 4 insertions, 0 deletions
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)_) |