Add driver to the Makefile.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:08:41 +0000 (18:08 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:08:41 +0000 (18:08 +0200)
Makefile

index 464ccbe..54f3c80 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ CC=gcc
 CFLAGS=-std=gnu99 -O2 -msse4.1 -g -Wall -Wextra
 LDFLAGS=-lm -lrt
 
-all: tests
+all: tests driver
 
 UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o benchmark.o
 unstuff_test: $(UNSTUFF_TEST_OBJS)
@@ -24,6 +24,10 @@ IDCT_TEST_OBJS=idct_float.o idct_imprecise_int.o idct_reference.o idct_test.o be
 idct_test: $(IDCT_TEST_OBJS)
        $(CC) $(LDFLAGS) -o $@ $(IDCT_TEST_OBJS)
 
+DRIVER_OBJS=driver.o idct_float.o unstuff.o bytesource.o bitsource.o choice.o dehuff.o input.o
+driver: $(DRIVER_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(DRIVER_OBJS)
+
 tests: unstuff_test bitsource_test dehuff_test bytesource_test idct_test
 clean:
        $(RM) $(UNSTUFF_TEST_OBJS) unstuff_test
@@ -31,6 +35,7 @@ clean:
        $(RM) $(DEHUFF_TEST_OBJS) dehuff_test
        $(RM) $(BYTESOURCE_TEST_OBJS) bytesource_test
        $(RM) $(IDCT_TEST_OBJS) idct_test
+       $(RM) $(IDCT_TEST_OBJS) driver
 
 test: tests
        ./unstuff_test