summaryrefslogtreecommitdiff
path: root/tools/functions.make
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-07-13 00:40:35 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-07-13 00:40:35 +0000
commit668a769ca4cabdfee54dc53e92a964c32c9738d7 (patch)
treea4c42168e4b86d4b7e09533307ae070fd3c7bcc0 /tools/functions.make
parent36eeecbe9a91a5da8bd82ee3974c359f4534dd14 (diff)
downloadrockbox-668a769ca4cabdfee54dc53e92a964c32c9738d7.tar.gz
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.make4
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) |
25preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \ 25preprocess2file = $(shell $(CC) $(PPCFLAGS) $(3) -E -P -x c -include config.h $(1) | \
26 grep -v '^\#' | grep -v "^$$" > $(2)) 26 grep -v '^\#' | grep -v "^$$" > $(2))
27 27
28asmdefs2file = $(shell $(CC) $(PPCFLAGS) $(3) -S -x c -o - -include config.h $(1) | \
29 perl -ne 'if(/^AD_(\w+):$$/){$$var=$$1}else{/^\W\.word\W(.*)$$/ && $$var && print "\#define $$var $$1\n";$$var=0}' > $2)
30
28c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1)))) 31c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1))))
29 32
30# calculate dependencies for a list of source files $(2) and output them 33# calculate dependencies for a list of source files $(2) and output them
@@ -32,6 +35,7 @@ c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1))))
32mkdepfile = $(shell \ 35mkdepfile = $(shell \
33 $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ 36 $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \
34 sed -e "s: lang.h: lang/lang_core.o:" \ 37 sed -e "s: lang.h: lang/lang_core.o:" \
38 -e 's:_asmdefs.o:_asmdefs.h:' \
35 -e "s: max_language_size.h: lang/max_language_size.h:" | \ 39 -e "s: max_language_size.h: lang/max_language_size.h:" | \
36 $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) \ 40 $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) \
37 >> $(1)_) 41 >> $(1)_)