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/root.make | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tools/root.make') diff --git a/tools/root.make b/tools/root.make index 00586379c6..8a923983f9 100644 --- a/tools/root.make +++ b/tools/root.make @@ -51,8 +51,8 @@ endif all: $(DEPFILE) build -# Subdir makefiles. their primary purpose is to populate SRC & OTHER_SRC -# but they also define special dependencies and compile rules +# Subdir makefiles. their primary purpose is to populate SRC, OTHER_SRC & +# ASMDEFS_SRC but they also define special dependencies and compile rules include $(TOOLSDIR)/tools.make include $(FIRMDIR)/firmware.make include $(ROOTDIR)/apps/bitmaps/bitmaps.make @@ -96,6 +96,7 @@ $(DEPFILE) dep: @echo foo > /dev/null # there must be a "real" command in the rule $(call mkdepfile,$(DEPFILE),$(SRC)) $(call mkdepfile,$(DEPFILE),$(OTHER_SRC)) + $(call mkdepfile,$(DEPFILE),$(ASMDEFS_SRC)) @mv $(DEPFILE)_ $(DEPFILE) $(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP)) @@ -317,6 +318,12 @@ $(BUILDDIR)/%.o: $(ROOTDIR)/%.S $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(CFLAGS) -c $< -o $@ +# generated definitions for use in .S files +$(BUILDDIR)/%_asmdefs.h: $(ROOTDIR)/%_asmdefs.c + $(call PRINTS,ASMDEFS $(@F)) + $(SILENT)mkdir -p $(dir $@) + $(call asmdefs2file,$<,$@) + # when source and object are both in BUILDDIR (generated code): %.o: %.c $(SILENT)mkdir -p $(dir $@) -- cgit v1.2.3