-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
66 lines (48 loc) · 1.83 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# pkg-config packages list
PKGS := x264 libavutil libavformat libavcodec libswscale libv4l2 opencv sdl2 SDL_net
PKG_CFLAGS := $(shell pkg-config --cflags $(PKGS))
PKG_LDFLAGS := $(shell pkg-config --libs $(PKGS))
ADD_CFLAGS := -g -D__STDC_CONSTANT_MACROS
ADD_LDFLAGS := -lrt
CFLAGS := $(PKG_CFLAGS) $(ADD_CFLAGS) $(CFLAGS)
LDFLAGS := $(PKG_LDFLAGS) $(ADD_LDFLAGS) $(LDFLAGS)
CXXFLAGS := $(CFLAGS)
ALL_BUILDS = \
encoder\
encoder_udp\
encoder_h264\
v4l2_enumerate\
test_data_source\
test_data_source_tcp_server\
test_data_source_udp\
test_data_source_ocv\
viewer_stdin\
viewer_sdl\
viewer_udp_ocv
all: .depend $(ALL_BUILDS)
SOURCES=`ls *.cpp`
.depend:
fastdep $(SOURCES) > .depend
-include .depend
encoder: encoder.o
g++ $? $(CFLAGS) -o $@ $(LDFLAGS)
encoder_udp: encoder_udp.o
g++ $? -o $@ $(LDFLAGS)
v4l2_enumerate: v4l2_enumerate.o
g++ $? -o $@ $(LDFLAGS)
viewer_stdin: viewer_stdin.o data_source_ocv_avcodec.o x264_destreamer.o packet_server.o data_source_stdio_info.o
g++ $? -o $@ $(LDFLAGS)
viewer_sdl: viewer_sdl.o x264_destreamer.o packet_server.o
g++ $? -o $@ $(LDFLAGS)
viewer_udp_ocv: viewer_udp_ocv.o x264_destreamer.o packet_server.o data_source_ocv_avcodec.o data_source_stdio_info.o
g++ $? -o $@ $(LDFLAGS)
test_data_source: test_data_source.o packet_server.o data_source_stdio.o data_source_stdio_info.o data_source_file.o
g++ $? -o $@ $(LDFLAGS)
test_data_source_tcp_server: test_data_source_tcp_server.o packet_server.o data_source_stdio_info.o data_source_tcp_server.o
g++ $? -o $@ $(LDFLAGS)
test_data_source_udp: test_data_source_udp.o packet_server.o data_source_stdio_info.o data_source_udp.o data_source_stdio.o
g++ $? -o $@ $(LDFLAGS)
test_data_source_ocv: test_data_source_ocv.o packet_server.o data_source_stdio_info.o data_source_ocv_avcodec.o
g++ $? -o $@ $(LDFLAGS)
clean:
rm -f *.o $(ALL_BUILDS)