-
Notifications
You must be signed in to change notification settings - Fork 238
/
Makefile.unix
58 lines (42 loc) · 1.79 KB
/
Makefile.unix
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
VERSION = 0.2.0
INCLUDES =
LIBS =
CC = gcc
CFLAGS += -std=c99 -pedantic -Wall -W -Wshadow -Wwrite-strings -Wno-unused -g $(INCLUDES)
LD = gcc
LDFLAGS += $(LIBS)
AR = ar
ARFLAGS = rsc
BINARIES = h264_analyze
all: libh264bitstream.a $(BINARIES)
# h264_slice_data.c: h264_slice_data.in.c process.pl
# perl process.pl > h264_slice_data.c < h264_slice_data.in.c
# h264_stream.c: h264_stream.in.c process.pl
# perl process.pl > h264_stream.c < h264_stream.in.c
# h264_sei.c: h264_sei.in.c process.pl
# perl process.pl > h264_sei.c < h264_sei.in.c
h264_analyze: h264_analyze.o libh264bitstream.a
$(LD) $(LDFLAGS) -o h264_analyze h264_analyze.o -L. -lh264bitstream -lm
libh264bitstream.a: h264_stream.c h264_nal.c h264_stream.h h264_slice_data.c h264_slice_data.h h264_sei.c h264_sei.h
$(CC) $(CFLAGS) -c -o h264_nal.o h264_nal.c
$(CC) $(CFLAGS) -c -o h264_stream.o h264_stream.c
$(CC) $(CFLAGS) -c -o h264_slice_data.o h264_slice_data.c
$(CC) $(CFLAGS) -c -o h264_sei.o h264_sei.c
$(AR) $(ARFLAGS) libh264bitstream.a h264_stream.o h264_nal.o h264_slice_data.o h264_sei.o
clean:
rm -f *.o libh264bitstream.a $(BINARIES)
rm -f libh264bitstream-uninstalled.sh libh264bitstream.pc.in
dox: h264_stream.c h264_stream.h bs.h Doxyfile
doxygen Doxyfile
dist: clean
mkdir h264bitstream-$(VERSION)
tar c --files-from=MANIFEST -f tmp.tar ; cd h264bitstream-$(VERSION) ; tar xf ../tmp.tar ; rm -f ../tmp.tar
tar czf ../h264bitstream-$(VERSION).tar.gz h264bitstream-$(VERSION)
rm -rf h264bitstream-$(VERSION)
test:
./h264_analyze samples/JM_cqm_cabac.264 > tmp1.out
diff -u samples/JM_cqm_cabac.out tmp1.out
./h264_analyze samples/x264_test.264 > tmp2.out
diff -u samples/x264_test.out tmp2.out
./h264_analyze samples/riverbed-II-360p-48961.264 > tmp3.out
diff -u samples/riverbed-II-360p-48961.out tmp3.out