changeset 26467:d5d8c4974d7a

Create standard recursive rules from a template.
author diego
date Tue, 22 Apr 2008 22:00:37 +0000
parents d4f4ce3534c3
children 7584a3580bcd
files Makefile
diffstat 1 files changed, 5 insertions(+), 55 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Apr 22 21:51:41 2008 +0000
+++ b/Makefile	Tue Apr 22 22:00:37 2008 +0000
@@ -247,72 +247,22 @@
 
 CFLAGS := $(subst -I..,-I.,$(CFLAGS))
 
-dvdread/dvdread.a:
-	$(MAKE) -C dvdread
-
-liba52/liba52.a:
-	$(MAKE) -C liba52
-
-libao2/libao2.a:
-	$(MAKE) -C libao2
-
-libavcodec/libavcodec.a:
-	$(MAKE) -C libavcodec
+define RECURSIVE_RULE
+$(part)/$(part).a:
+	$(MAKE) -C $(part)
+endef
 
-libavformat/libavformat.a:
-	$(MAKE) -C libavformat
-
-libavutil/libavutil.a:
-	$(MAKE) -C libavutil
-
-libdvdcss/libdvdcss.a:
-	$(MAKE) -C libdvdcss
-
-libfaad2/libfaad2.a:
-	$(MAKE) -C libfaad2
-
-libmpcodecs/libmpcodecs.a:
-	$(MAKE) -C libmpcodecs
+$(foreach part,$(PARTS),$(eval $(RECURSIVE_RULE)))
 
 libmpcodecs/libmpencoders.a:
 	$(MAKE) -C libmpcodecs libmpencoders.a
 
-libmpdemux/libmpdemux.a:
-	$(MAKE) -C libmpdemux libmpdemux.a
-
 libmpdemux/libmpmux.a:
 	$(MAKE) -C libmpdemux libmpmux.a
 
-libmpeg2/libmpeg2.a:
-	$(MAKE) -C libmpeg2
-
-libpostproc/libpostproc.a:
-	$(MAKE) -C libpostproc
-
-libswscale/libswscale.a:
-	$(MAKE) -C libswscale
-
-libvo/libvo.a:
-	$(MAKE) -C libvo libvo.a
-
 libvo/libosd.a:
 	$(MAKE) -C libvo libosd.a
 
-loader/loader.a:
-	$(MAKE) -C loader
-
-mp3lib/mp3lib.a:
-	$(MAKE) -C mp3lib
-
-stream/stream.a:
-	$(MAKE) -C stream
-
-tremor/tremor.a:
-	$(MAKE) -C tremor
-
-vidix/vidix.a:
-	$(MAKE) -C vidix
-
 mplayer$(EXESUF): $(MPLAYER_DEPS)
 	$(CC) -o $@ $^ $(LDFLAGS_MPLAYER)