From b8fcb619e9009fa4caee97209e8e4e08bc1ef717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Thu, 3 Apr 2008 23:51:29 +0000 Subject: [PATCH] simplify LDFLAGS and EXTRALIBS handling Originally committed as revision 12683 to svn://svn.ffmpeg.org/ffmpeg/trunk --- Makefile | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 4caa076d58..acc2015886 100644 --- 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)