Commit 0b76aa0c authored by mru's avatar mru

consolidate CFLAGS, LDFLAGS, EXTRALIBS assignment


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12354 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 55b46ae1
...@@ -10,14 +10,20 @@ vpath %.S $(LIBSRC) ...@@ -10,14 +10,20 @@ vpath %.S $(LIBSRC)
SRC_DIR = "$(LIBSRC)" SRC_DIR = "$(LIBSRC)"
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
CFLAGS += $(CFLAGS-yes) CFLAGS += $(CFLAGS-yes)
OBJS += $(OBJS-yes) OBJS += $(OBJS-yes)
ASM_OBJS += $(ASM_OBJS-yes) ASM_OBJS += $(ASM_OBJS-yes)
CPP_OBJS += $(CPP_OBJS-yes) CPP_OBJS += $(CPP_OBJS-yes)
FFLIBS += $(FFLIBS-yes)
CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \ -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \
-I$(SRC_PATH)/libavutil $(OPTFLAGS) $(addprefix -I$(SRC_PATH)/lib,$(ALLFFLIBS)) $(OPTFLAGS)
EXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
LDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(FFLIBS)) $(LDFLAGS)
SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp) SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS) OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
# #
include ../config.mak include ../config.mak
CFLAGS += -I$(SRC_PATH)/libswscale -I$(SRC_PATH)/libavcodec
OBJS = allcodecs.o \ OBJS = allcodecs.o \
audioconvert.o \ audioconvert.o \
bitstream.o \ bitstream.o \
...@@ -456,7 +454,7 @@ ASM_OBJS-$(ARCH_BFIN) += bfin/pixels_bfin.o \ ...@@ -456,7 +454,7 @@ ASM_OBJS-$(ARCH_BFIN) += bfin/pixels_bfin.o \
bfin/idct_bfin.o \ bfin/idct_bfin.o \
bfin/vp3_idct_bfin.o \ bfin/vp3_idct_bfin.o \
EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS) FFLIBS = avutil
NAME=avcodec NAME=avcodec
LIBVERSION=$(LAVCVERSION) LIBVERSION=$(LAVCVERSION)
......
...@@ -4,11 +4,7 @@ NAME=avdevice ...@@ -4,11 +4,7 @@ NAME=avdevice
LIBVERSION=$(LAVDVERSION) LIBVERSION=$(LAVDVERSION)
LIBMAJOR=$(LAVDMAJOR) LIBMAJOR=$(LAVDMAJOR)
EXTRALIBS := -L$(BUILD_ROOT)/libavformat -lavformat$(BUILDSUF) \ FFLIBS = avformat avcodec avutil
-L$(BUILD_ROOT)/libavcodec -lavcodec$(BUILDSUF) \
-L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
CFLAGS += -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat
OBJS = alldevices.o OBJS = alldevices.o
......
include ../config.mak include ../config.mak
CFLAGS+=-I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libswscale
OBJS = allfilters.o \ OBJS = allfilters.o \
avfilter.o \ avfilter.o \
defaults.o \ defaults.o \
...@@ -11,17 +9,10 @@ OBJS = allfilters.o \ ...@@ -11,17 +9,10 @@ OBJS = allfilters.o \
HEADERS = avfilter.h HEADERS = avfilter.h
EXTRALIBS := -L$(BUILD_ROOT)/libavcodec -lavcodec$(BUILDSUF) \ FFLIBS = avcodec avutil
-L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
ifeq ($(CONFIG_SWSCALER),yes)
EXTRALIBS+=-L$(BUILD_ROOT)/libswscale
EXTRALIBS+=-lswscale$(BUILDSUF)
endif
ifeq ($(CONFIG_AVFILTER_LAVF),yes) FFLIBS-$(CONFIG_SWSCALER) += swscale
EXTRALIBS := -L$(BUILD_ROOT)/libavformat -lavformat$(BUILDSUF) $(EXTRALIBS) FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
endif
NAME=avfilter NAME=avfilter
LIBVERSION=$(LAVFIVERSION) LIBVERSION=$(LAVFIVERSION)
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
# #
include ../config.mak include ../config.mak
CFLAGS += -I$(SRC_PATH)/libavcodec
OBJS = allformats.o cutils.o os_support.o sdp.o utils.o OBJS = allformats.o cutils.o os_support.o sdp.o utils.o
HEADERS = avformat.h avio.h rtsp.h rtspcodes.h HEADERS = avformat.h avio.h rtsp.h rtspcodes.h
...@@ -182,9 +180,6 @@ OBJS-$(CONFIG_LIBNUT_MUXER) += libnut.o riff.o ...@@ -182,9 +180,6 @@ OBJS-$(CONFIG_LIBNUT_MUXER) += libnut.o riff.o
OBJS-$(CONFIG_VHOOK) += framehook.o OBJS-$(CONFIG_VHOOK) += framehook.o
EXTRALIBS := -L$(BUILD_ROOT)/libavcodec -lavcodec$(BUILDSUF) \
-L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
# protocols I/O # protocols I/O
OBJS+= avio.o aviobuf.o OBJS+= avio.o aviobuf.o
...@@ -195,6 +190,8 @@ OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o ...@@ -195,6 +190,8 @@ OBJS-$(CONFIG_RTP_PROTOCOL) += rtpproto.o
OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o OBJS-$(CONFIG_TCP_PROTOCOL) += tcp.o
OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
FFLIBS = avcodec avutil
NAME=avformat NAME=avformat
LIBVERSION=$(LAVFVERSION) LIBVERSION=$(LAVFVERSION)
LIBMAJOR=$(LAVFMAJOR) LIBMAJOR=$(LAVFMAJOR)
......
include ../config.mak include ../config.mak
EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS) FFLIBS = avutil
NAME=postproc NAME=postproc
LIBVERSION=$(SPPVERSION) LIBVERSION=$(SPPVERSION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment