summaryrefslogtreecommitdiff
path: root/libavcodec/Makefile
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-28 18:42:52 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-10-28 18:42:52 +0000
commiteadaa00c6fe1752b0460aa0c94d3df47502c78df (patch)
treeccd06bce01559b6a6414998bd3e2dfc90a016b54 /libavcodec/Makefile
parent1a04d4c7225db023bb96b5dfb7b9368c6677da56 (diff)
Add support for hardcoding the mpegaudiodec tables.
Reduces .bss size by about 194 kB. Originally committed as revision 20400 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/Makefile')
-rw-r--r--libavcodec/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 30cdd11d6d..b53d503bb0 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -687,7 +687,7 @@ TESTPROGS-$(HAVE_MMX) += motion
DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
-CLEANFILES = sin_tables.c cos_tables.c costablegen$(HOSTEXESUF)
+CLEANFILES = sin_tables.c cos_tables.c costablegen$(HOSTEXESUF) *_tables.h *_tablegen$(HOSTEXESUF)
include $(SUBDIR)../subdir.mak
@@ -701,3 +701,15 @@ $(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
$(SUBDIR)sin_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
./$< sin > $@
+
+ifeq ($(CONFIG_MPEGAUDIO_HP),yes)
+$(SUBDIR)mpegaudio_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DFRAC_BITS=23
+else
+$(SUBDIR)mpegaudio_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DFRAC_BITS=15
+endif
+$(SUBDIR)%_tablegen$(HOSTEXESUF): $(SUBDIR)%_tablegen.c $(SUBDIR)tableprint.c
+ $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTLIBS)
+
+$(SUBDIR)mpegaudiodec.c: $(SUBDIR)mpegaudio_tables.h
+$(SUBDIR)%_tables.h: $(SUBDIR)%_tablegen$(HOSTEXESUF)
+ ./$< > $@