-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
98 lines (76 loc) · 1.65 KB
/
Makefile
File metadata and controls
98 lines (76 loc) · 1.65 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
LD=${CC}
# use the following line if you want to compile the source for 64 bit
# architectures
mode=64bit
# use the following line if you want to compile the source for 32 bits
# architectures
#mode=32bit
# use this flag to compile on windows
#os=windows
ifeq (${mode},64bit)
CFLAGS+=-m64 -DSIXTYFOURBITS
CFLAGSOPT+=-m64 -DSIXTYFOURBITS
LDFLAGS+=-m64
else
CFLAGS+=-m32
CFLAGSOPT+=-m32
LDFLAGS+=-m32
endif
ifeq (${os},windows)
CFLAGS+=-DWIN32
CFLAGSOPT+=-DWIN32
endif
CFLAGSOPT+=-g -O3 -Wall -ansi -pedantic
CFLAGS+=-g -Wall -ansi -pedantic -DDEBUG
LDLIBS+=-lgsl -lgslcblas -lm
OBJ=main.o\
wotd.o\
reverse.o\
mapfile.o\
alpha.o\
fsmTree.o\
decoderTree.o\
suffixTree.o\
statistics.o\
see.o\
encoder.o\
decoder.o\
arithmetic/bitio.o\
arithmetic/coder.o\
gammaFunc.o\
reset.o
OBJOPT=main.opt.o\
wotd.opt.o\
reverse.opt.o\
mapfile.opt.o\
alpha.opt.o\
fsmTree.opt.o\
decoderTree.opt.o\
suffixTree.opt.o\
statistics.opt.o\
see.opt.o\
encoder.opt.o\
decoder.opt.o\
arithmetic/bitio.o\
arithmetic/coder.o\
gammaFunc.opt.o\
reset.opt.o
.PHONY: all arithmetic doc clean doc-clean
all: arithmetic context.opt context
arithmetic:
${MAKE} -C arithmetic "CFLAGS=${CFLAGSOPT}"
context: ${OBJ}
${LD} ${LDFLAGS} ${OBJ} -o $@ ${LDLIBS}
ln -sf context uncontext
context.opt: ${OBJOPT}
${LD} ${LDFLAGS} ${OBJOPT} -o $@ ${LDLIBS}
ln -sf context.opt uncontext.opt
doc:
doxygen Doxyfile
doc-clean:
rm -rf doc/*
clean:
rm -f *.[ox]
${MAKE} -C arithmetic clean
%.opt.o: %.c
$(CC) $(CFLAGSOPT) -c $? -o $@