Add driver to the Makefile.
[fjl] / Makefile
index 464ccbe3ef124d9c729056ba7807c2489f8232b6..54f3c8074e8e4123a1ffbf63d900ac1f34f586f1 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