2017-09-29 18:09:19 +00:00
|
|
|
# use pkg-config for getting CFLAGS and LDLIBS
|
|
|
|
FFMPEG_LIBS= libavdevice \
|
|
|
|
libavformat \
|
|
|
|
libavfilter \
|
|
|
|
libavcodec \
|
|
|
|
libswresample \
|
|
|
|
libswscale \
|
|
|
|
libavutil \
|
|
|
|
|
|
|
|
CFLAGS += -Wall -g
|
|
|
|
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
|
|
|
|
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
|
|
|
|
|
2023-01-15 15:48:30 +00:00
|
|
|
# missing the following targets, since they need special options in the FFmpeg build:
|
|
|
|
# qsv_decode
|
|
|
|
# qsv_transcode
|
|
|
|
# vaapi_encode
|
|
|
|
# vaapi_transcode
|
|
|
|
|
2023-01-15 11:44:04 +00:00
|
|
|
EXAMPLES=\
|
|
|
|
avio_http_serve_files \
|
|
|
|
avio_list_dir \
|
2023-01-15 02:06:39 +00:00
|
|
|
avio_read_callback \
|
2017-09-29 18:09:19 +00:00
|
|
|
decode_audio \
|
2023-01-15 11:26:30 +00:00
|
|
|
decode_filter_audio \
|
2023-01-15 11:33:11 +00:00
|
|
|
decode_filter_video \
|
2017-09-29 18:09:19 +00:00
|
|
|
decode_video \
|
2023-01-15 02:13:01 +00:00
|
|
|
demux_decode \
|
2017-09-29 18:09:19 +00:00
|
|
|
encode_audio \
|
|
|
|
encode_video \
|
|
|
|
extract_mvs \
|
|
|
|
hw_decode \
|
2023-01-15 11:53:31 +00:00
|
|
|
mux \
|
2023-01-15 12:03:47 +00:00
|
|
|
remux \
|
2023-01-15 15:43:06 +00:00
|
|
|
resample_audio \
|
2023-01-15 15:44:25 +00:00
|
|
|
scale_video \
|
2023-01-15 11:49:32 +00:00
|
|
|
show_metadata \
|
2017-09-29 18:09:19 +00:00
|
|
|
transcode_aac \
|
2023-01-15 15:48:30 +00:00
|
|
|
transcode
|
2017-09-29 18:09:19 +00:00
|
|
|
|
|
|
|
OBJS=$(addsuffix .o,$(EXAMPLES))
|
|
|
|
|
|
|
|
# the following examples make explicit use of the math library
|
|
|
|
avcodec: LDLIBS += -lm
|
|
|
|
encode_audio: LDLIBS += -lm
|
2023-04-16 11:39:27 +00:00
|
|
|
mux: LDLIBS += -lm
|
|
|
|
resample_audio: LDLIBS += -lm
|
2017-09-29 18:09:19 +00:00
|
|
|
|
|
|
|
.phony: all clean-test clean
|
|
|
|
|
|
|
|
all: $(OBJS) $(EXAMPLES)
|
|
|
|
|
|
|
|
clean-test:
|
|
|
|
$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg
|
|
|
|
|
|
|
|
clean: clean-test
|
|
|
|
$(RM) $(EXAMPLES) $(OBJS)
|