-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
53 lines (35 loc) · 1.73 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
CFLAGS = -std=c89 -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
CC=gcc
all: fixed adaptive
# ----------------------------------------------------------------------
# ----------------------------- FIXED MODEL ----------------------------
# ----------------------------------------------------------------------
fixed: encode_f decode_f
encode_f: encode arithmetic_encode bit_output fixed_model
$(CC) -o encode_f encode.o arithmetic_encode.o bit_output.o fixed_model.o
encode: encode.c model.h
$(CC) $(CFLAGS) -c encode.c
arithmetic_encode: arithmetic_encode.c arithmetic_coding.h
$(CC) $(CFLAGS) -c arithmetic_encode.c
bit_output: bit_output.c
$(CC) $(CFLAGS) -c bit_output.c
fixed_model: fixed_model.c model.h
$(CC) $(CFLAGS) -c fixed_model.c
decode_f: decode arithmetic_decode bit_input fixed_model
$(CC) -o decode_f decode.o arithmetic_decode.o bit_input.o fixed_model.o
decode: decode.c model.h
$(CC) $(CFLAGS) -c decode.c
arithmetic_decode: arithmetic_decode.c arithmetic_coding.h
$(CC) $(CFLAGS) -c arithmetic_decode.c
bit_input: bit_input.c arithmetic_coding.h
$(CC) $(CFLAGS) -c bit_input.c
# ----------------------------------------------------------------------
# --------------------------- ADAPTIVE MODEL ---------------------------
# ----------------------------------------------------------------------
adaptive: encode_a decode_a
encode_a: encode arithmetic_encode bit_output adaptive_model
$(CC) -o encode_a encode.o arithmetic_encode.o bit_output.o adaptive_model.o
decode_a: decode arithmetic_decode bit_input adaptive_model
$(CC) -o decode_a decode.o arithmetic_decode.o bit_input.o adaptive_model.o
adaptive_model: adaptive_model.o model.h
$(CC) $(CFLAGS) -c adaptive_model.c