[MPlayer-dev-eng] "libdeps" trick
D Richard Felker III
dalias at aerifal.cx
Thu Aug 29 04:02:31 CEST 2002
I've been bothered for some time now by the fact that MPlayer's make
system doesn't like to recurse into subdirectories when the necessary
libs already exist unless told to explicitly, so I came up with a
little workaround. I was going to ask before including it, but since I
made the 10l mistake of committing part of it before it was done, I
figured I might as well go ahead and add the lines to Makefile. By
themselves they do nothing, but if the attached file is put in the
main mplayer dir as .libdeps, then make will recurse into any of the
lib subdirectories it needs with contain changed .c or .h files during
the make process. After that, the Makefiles in the individual dirs
will takeover, and may or may not decide to actually build anything
based on the rules, so it shouldn't hurt performance. IMO .libdeps
should go in ./etc or something by default, so that users who want
this functionality can enable it while everyone else can easily ignore
it.
Rich
-------------- next part --------------
# If included in the main MPlayer Makefile, this file causes make to
# recurse into subdirectories whenever any .c or .h files in those
# directories have changed. Then the Makefile in that directory will
# take over for detailed dependencies.
libmpdvdkit/libmpdvdkit.a libmpdvdkit/libmpdvdkit.so: $(wildcard libmpdvdkit/*.[ch])
libmpdvdkit2/libmpdvdkit.a libmpdvdkit2/libmpdvdkit.so: $(wildcard libmpdvdkit2/*.[ch])
loader/libloader.a: $(wildcard loader/*.[ch])
libfame/libfame.a: $(wildcard libfame/*.[ch])
libmpdemux/libmpdemux.a: $(wildcard libmpdemux/*.[ch])
libmpcodecs/libmpcodecs.a: $(wildcard libmpcodecs/*.[ch])
loader/dshow/libDS_Filter.a: $(wildcard loader/dshow/*.[ch])
libmp1e/libmp1e.a: $(wildcard libmp1e/*.[ch])
libavcodec/libavcodec.a: $(wildcard libavcodec/*.[ch])
libmpeg2/libmpeg2.a: $(wildcard libmpeg2/*.[ch])
libvo/libvo.a: $(wildcard libvo/*.[ch])
libao2/libao2.a: $(wildcard libao2/*.[ch])
liba52/liba52.a: $(wildcard liba52/*.[ch])
mp3lib/libMP3.a: $(wildcard mp3lib/*.[ch])
libdha/libdha.so: $(wildcard libdha/*.[ch])
vidix/libvidix.a: $(wildcard vidix/*.[ch])
Gui/libgui.a: $(wildcard Gui/*.[ch])
linux/libosdep.a: $(wildcard linux/*.[ch])
postproc/libpostproc.a: $(wildcard postproc/*.[ch])
input/libinput.a: $(wildcard input/*.[ch])
More information about the MPlayer-dev-eng
mailing list