Add optional padding data at the end to the bit source (is that the right place?...
[fjl] / Makefile
1 CC=gcc
2 CFLAGS=-std=gnu99 -O2 -msse4.1 -g -Wall -Wextra
3 LDFLAGS=-lm -lrt
4
5 all: tests
6
7 UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o benchmark.o
8 unstuff_test: $(UNSTUFF_TEST_OBJS)
9         $(CC) $(LDFLAGS) -o $@ $(UNSTUFF_TEST_OBJS)
10
11 BITSOURCE_TEST_OBJS=bitsource.o bitsource_test.o
12 bitsource_test: $(BITSOURCE_TEST_OBJS)
13         $(CC) $(LDFLAGS) -o $@ $(BITSOURCE_TEST_OBJS)
14
15 DEHUFF_TEST_OBJS=dehuff.o input.o bitsource.o dehuff_test.o
16 dehuff_test: $(DEHUFF_TEST_OBJS)
17         $(CC) $(LDFLAGS) -o $@ $(DEHUFF_TEST_OBJS)
18
19 BYTESOURCE_TEST_OBJS=bytesource.o choice.o unstuff.o bytesource_test.o idct_float.o
20 bytesource_test: $(BYTESOURCE_TEST_OBJS)
21         $(CC) $(LDFLAGS) -o $@ $(BYTESOURCE_TEST_OBJS)
22
23 IDCT_TEST_OBJS=idct_float.o idct_imprecise_int.o idct_reference.o idct_test.o benchmark.o
24 idct_test: $(IDCT_TEST_OBJS)
25         $(CC) $(LDFLAGS) -o $@ $(IDCT_TEST_OBJS)
26
27 tests: unstuff_test bitsource_test dehuff_test bytesource_test idct_test
28 clean:
29         $(RM) $(UNSTUFF_TEST_OBJS) unstuff_test
30         $(RM) $(BITSOURCE_TEST_OBJS) bitsource_test
31         $(RM) $(DEHUFF_TEST_OBJS) dehuff_test
32         $(RM) $(BYTESOURCE_TEST_OBJS) bytesource_test
33         $(RM) $(IDCT_TEST_OBJS) idct_test
34
35 test: tests
36         ./unstuff_test
37         ./bitsource_test
38         ./dehuff_test
39         ./bytesource_test
40         ./idct_test