simplify LDFLAGS and EXTRALIBS handling
authorMåns Rullgård <mans@mansr.com>
Thu, 3 Apr 2008 23:51:29 +0000 (23:51 +0000)
committerMåns Rullgård <mans@mansr.com>
Thu, 3 Apr 2008 23:51:29 +0000 (23:51 +0000)
Originally committed as revision 12683 to svn://svn.ffmpeg.org/ffmpeg/trunk

Makefile

index 4caa076d58f12b5476eb1379ab99ddb6fe990f29..acc201588669ace4cc7e0076110beae1636f96ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,14 +24,11 @@ ALLPROGS    = $(addsuffix   $(EXESUF), $(BASENAMES))
 ALLPROGS_G  = $(addsuffix _g$(EXESUF), $(BASENAMES))
 ALLMANPAGES = $(addsuffix .1, $(BASENAMES))
 
-LIBS-$(CONFIG_AVFILTER) += avfilter
-LIBS-$(CONFIG_POSTPROC) += postproc
-LIBS-$(CONFIG_SWSCALE)  += swscale
+FFLIBS-$(CONFIG_AVFILTER) += avfilter
+FFLIBS-$(CONFIG_POSTPROC) += postproc
+FFLIBS-$(CONFIG_SWSCALE)  += swscale
 
-LIBS := avcodec avdevice avformat avutil $(LIBS-yes)
-
-S := $(BUILD_SHARED:yes=S)
-DEP_LIBS := $(foreach L,$(LIBS),lib$(L)/$($(S)LIBPREF)$(L)$($(S)LIBSUF))
+FFLIBS := avdevice avformat avcodec avutil
 
 ALL_TARGETS-$(CONFIG_VHOOK) += videohook
 ALL_TARGETS-$(BUILD_DOC)    += documentation
@@ -56,6 +53,9 @@ DISABLE=yes
 
 include common.mak
 
+S := $(BUILD_SHARED:yes=S)
+DEP_LIBS := $(foreach L,$(FFLIBS),lib$(L)/$($(S)LIBPREF)$(L)$($(S)LIBSUF))
+
 VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
 
 BASEHOOKS = fish null watermark
@@ -78,14 +78,6 @@ VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
 
 vhook/%.o: CFLAGS:=$(VHOOKCFLAGS)
 
-LDFLAGS-$(CONFIG_SWSCALE) += -L$(BUILD_ROOT)/libswscale
-LDFLAGS-$(CONFIG_AVFILTER) += -L$(BUILD_ROOT)/libavfilter
-LDFLAGS := $(LDFLAGS-yes) -L$(BUILD_ROOT)/libavdevice -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil -g $(LDFLAGS)
-
-EXTRALIBS-$(CONFIG_AVFILTER) += -lavfilter$(BUILDSUF)
-EXTRALIBS-$(CONFIG_SWSCALE) += -lswscale$(BUILDSUF)
-EXTRALIBS := $(EXTRALIBS-yes) -lavdevice$(BUILDSUF) -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)
-
 MAKE-yes = $(MAKE)
 MAKE-    = : $(MAKE)