aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@mplayer2.org>2012-07-28 18:48:59 +0200
committerGravatar wm4 <wm4@mplayer2.org>2012-07-28 20:44:59 +0200
commitcee35cd72501e47d6de6c17af7d6eefdb2e3bb99 (patch)
tree92c1aec42f9140a37046a2cfa1cffad95e90a730 /Makefile
parentb319ae9190f7cdb98444a0fa3381b2b7f02fb920 (diff)
Makefile: move dependency rules for autogenerated files
Explicit dependency rules are needed when a source file depends on an autogenerated file. Move these rules to the same place in the Makefile as the rules for creating the generated files. Also, change the rules to declare the direct dependency, not a transitive one (e.g. codecs.conf.h is needed by codec-cfg.c, not codec-cfg.o). In practice, this shouldn't change anything, but it's cleaner.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 5 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 7f30c49e4e..1503690015 100644
--- a/Makefile
+++ b/Makefile
@@ -595,23 +595,26 @@ mplayer$(EXESUF): EXTRALIBS += $(EXTRALIBS_MPLAYER)
mplayer$(EXESUF):
$(CC) -o $@ $^ $(EXTRALIBS)
+codec-cfg.c: codecs.conf.h
codecs.conf.h: TOOLS/file2string.py etc/codecs.conf
./$^ >$@
+libvo/vo_vdpau.c: libvo/vdpau_template.c
libvo/vdpau_template.c: TOOLS/vdpau_functions.py
./$< > $@
+libmpdemux/ebml.c libmpdemux/demux_mkv.c: libmpdemux/ebml_types.h
libmpdemux/ebml_types.h: TOOLS/matroska.py
./$< --generate-header > $@
+libmpdemux/ebml.c: libmpdemux/ebml_defs.c
libmpdemux/ebml_defs.c: TOOLS/matroska.py
./$< --generate-definitions > $@
+libvo/vo_gl3.c: libvo/vo_gl3_shaders.h
libvo/vo_gl3_shaders.h: TOOLS/file2string.py libvo/vo_gl3_shaders.glsl
./$^ >$@
-libvo/vo_gl3.c: libvo/vo_gl3_shaders.h
-
# ./configure must be rerun if it changed
config.mak: configure
@echo "############################################################"
@@ -642,12 +645,7 @@ checkheaders: $(ALLHEADERS:.h=.ho)
###### dependency declarations / specific CFLAGS ######
-# Make sure all generated header files are created.
-codec-cfg.o: codecs.conf.h
mpcommon.o osdep/mplayer-rc.o: version.h
-libvo/vo_vdpau.o: libvo/vdpau_template.c
-libmpdemux/ebml.o libmpdemux/demux_mkv.o: libmpdemux/ebml_types.h
-libmpdemux/ebml.o: libmpdemux/ebml_defs.c
# Files that depend on libavcodec internals
libmpcodecs/vf_fspp.o libmpcodecs/vf_mcdeint.o libmpcodecs/vf_spp.o: CFLAGS := -I$(FFMPEG_SOURCE_PATH) $(CFLAGS)