Mercurial > libavcodec.hg
diff Makefile @ 10469:23ca6d60184d libavcodec
Add support for hardcoding the mpegaudiodec tables.
Reduces .bss size by about 194 kB.
author | reimar |
---|---|
date | Wed, 28 Oct 2009 18:42:52 +0000 |
parents | 212a837ebd27 |
children | 5e984fa3613f |
line wrap: on
line diff
--- a/Makefile Wed Oct 28 14:40:05 2009 +0000 +++ b/Makefile Wed Oct 28 18:42:52 2009 +0000 @@ -687,7 +687,7 @@ 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)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) + ./$< > $@