summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2012-07-02 02:35:57 +0300
committerUoti Urpala <uau@mplayer2.org>2012-07-16 21:08:42 +0300
commit2ba8b91a97e7e873a522f365e41a293af980c91a (patch)
tree40a17dd313350955ecdb285c06fbba005caa4ad9 /Makefile
parent39a45c7a175acf7ef5546073f62f5b9b7f83a893 (diff)
downloadmpv-2ba8b91a97e7e873a522f365e41a293af980c91a.tar.bz2
mpv-2ba8b91a97e7e873a522f365e41a293af980c91a.tar.xz
build, codec-cfg.c: simplify builtin codecs.conf handling
The player can read codec mapping (codecs.conf) from an external file or use embedded defaults. Before, the defaults were stored in the player binary in the form of final already-parsed data structures. Simplify things by storing the text of the codecs.conf file instead, and parse that at runtime the same way an external file would be parsed. To create the previous parsed form, the build system first compiled a separate binary named "codec-cfg", which parsed etc/codecs.conf and then wrote the results as a C data structure that could be compiled into the program. The new simple conversion of codecs.conf into a C string is handled by the new script TOOLS/file2string.py. After removing the codec-cfg binary, HOST_CC is no longer used for anything. Remove the --host-cc configure option and associated logic. Also remove the codec2html and codec-cfg-test functionality. Building those was already broken and nobody cared. There was a broken 3-character-long "fourcc" entry in etc/codecs.conf. This happened to be accepted before but triggered a parse error after the changes. Remove the broken entry and make the parsing functions explicitly test for this error.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 4 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index f90aa5e906..871beb782e 100644
--- a/Makefile
+++ b/Makefile
@@ -592,11 +592,8 @@ mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
mplayer$(EXESUF):
$(CC) -o $@ $^ $(EXTRALIBS)
-codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h
- $(HOST_CC) -O -DCODECS2HTML -I. -o $@ $<
-
-codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
- ./$^ > $@
+codecs.conf.h: TOOLS/file2string.py etc/codecs.conf
+ ./$^ >$@
libvo/vdpau_template.c: TOOLS/vdpau_functions.py
./$< > $@
@@ -716,7 +713,7 @@ distclean: clean testsclean toolsclean driversclean
-$(RM) config.log config.mak config.h codecs.conf.h version.h TAGS tags
-$(RM) libvo/vdpau_template.c
-$(RM) libmpdemux/ebml_types.h libmpdemux/ebml_defs.c
- -$(RM) $(call ADD_ALL_EXESUFS,codec-cfg cpuinfo)
+ -$(RM) $(call ADD_ALL_EXESUFS,cpuinfo)
doxygen:
doxygen DOCS/tech/Doxyfile
@@ -731,18 +728,12 @@ tags:
TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
-codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h $(TEST_OBJS)
- $(CC) -I. -DTESTING -o $@ $^
-
-codecs2html$(EXESUF): codec-cfg.c $(TEST_OBJS)
- $(CC) -I. -DCODECS2HTML -o $@ $^
-
LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
-TESTS = codecs2html codec-cfg-test
+TESTS =
ifdef ARCH_X86
TESTS += loader/qtx/list loader/qtx/qtxload