-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
35 lines (26 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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)
CXXFLAGS := $(CFLAGS) -std=c++11
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
EXAMPLES= h265enc h26xdec h264enc dump_yuv
# the following examples make explicit use of the math library
.phony: all clean-test clean
all: $(EXAMPLES)
h264enc: LDLIBS += -lm
h265enc: LDLIBS += -lm
h26xdec: h26xdec.cpp
$(CXX) $< -lm $(CXXFLAGS) $(LDLIBS) -o $@
roundtrip : roundtrip.cpp
$(CXX) $< -lm $(CXXFLAGS) $(LDLIBS) -o $@
clean-test:
$(RM) test*.pgm test.h264 test.mp2 test.sw test.mpg *ppm
clean: clean-test
$(RM) $(EXAMPLES)