-include ../config.mak
+include $(SUBDIR)../config.mak
-CFLAGS+=-I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libswscale
+NAME = avfilter
+FFLIBS = avcodec avutil swscale
+FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
-OBJS = avfilter.o \
- avfiltergraph.o \
- avfiltergraphdesc.o \
- defaults.o \
+HEADERS = avfilter.h
-# TODO: real conditional compilation
-OBJS-yes = vf_crop.o \
- vf_fifo.o \
- vf_fps.o \
- vf_negate.o \
- vf_overlay.o \
- vf_passthrough.o \
- vf_scale.o \
- vf_slicify.o \
- vf_split.o \
- vf_vflip.o \
+OBJS = allfilters.o \
+ avfilter.o \
+ avfiltergraph.o \
+ defaults.o \
+ formats.o \
+ graphparser.o \
+ parseutils.o \
-HEADERS = avfilter.h
+OBJS-$(CONFIG_ASPECT_FILTER) += vf_aspect.o
+OBJS-$(CONFIG_CROP_FILTER) += vf_crop.o
+OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
+OBJS-$(CONFIG_NOFORMAT_FILTER) += vf_format.o
+OBJS-$(CONFIG_NULL_FILTER) += vf_null.o
+OBJS-$(CONFIG_PAD_FILTER) += vf_pad.o
+OBJS-$(CONFIG_PIXELASPECT_FILTER) += vf_aspect.o
+OBJS-$(CONFIG_SCALE_FILTER) += vf_scale.o
+OBJS-$(CONFIG_SLICIFY_FILTER) += vf_slicify.o
+OBJS-$(CONFIG_UNSHARP_FILTER) += vf_unsharp.o
+OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o
-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
+OBJS-$(CONFIG_BUFFER_FILTER) += vsrc_buffer.o
+OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o
-NAME=avfilter
-LIBVERSION=$(LAVFILTERVERSION)
-LIBMAJOR=$(LAVFILTERMAJOR)
+OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
-include ../common.mak
+include $(SUBDIR)../subdir.mak