mplayer: use $(if ...) to add dependencies to mplayer
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Mon, 1 Dec 2008 13:33:33 +0000 (13:33 -0000)
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Mon, 1 Dec 2008 13:33:33 +0000 (13:33 -0000)
This patch will add needed libraries with $(if ...) syntax. This should ease
readability and make it easy for others to spot where the depencies are added.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
package/multimedia/mplayer/mplayer.mk

index 350c6b06c242f4ce7b6f02f3424fe0c736f4df08..90ac630a04040e7884d4ce1e97208d4f077db5d6 100644 (file)
@@ -17,12 +17,6 @@ else
 MPLAYER_ENDIAN:=--disable-big-endian
 endif
 
-MPLAYER_DEP_LIBS:=libmad
-
-ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
-MPLAYER_DEP_LIBS+=alsa-lib
-endif
-
 $(DL_DIR)/$(MPLAYER_SOURCE):
        $(WGET) -P $(DL_DIR) $(MPLAYER_SITE)/$(MPLAYER_SOURCE)
 
@@ -66,7 +60,7 @@ $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
        -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
        touch -c $@
 
-mplayer: uclibc $(MPLAYER_DEP_LIBS) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+mplayer: uclibc $(if $(BR2_PACKAGE_LIBMAD),libmad) $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
 
 mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)