Add a simple Makefile for compiling and running tests.
authorSteinar H. Gunderson <sesse@debian.org>
Fri, 2 Jan 2009 15:48:52 +0000 (16:48 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Fri, 2 Jan 2009 15:48:52 +0000 (16:48 +0100)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..7d9b6d0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+CC=gcc
+CFLAGS=-std=gnu99 -O2 -msse4.1
+LDFLAGS=
+
+all: tests
+
+UNSTUFF_TEST_OBJS=unstuff.o unstuff_test.o
+unstuff_test: $(UNSTUFF_TEST_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(UNSTUFF_TEST_OBJS)
+
+INPUT_TEST_OBJS=input.o input_test.o
+input_test: $(INPUT_TEST_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(INPUT_TEST_OBJS)
+
+OBJS=$(UNSTUFF_TEST_OBJS)
+
+tests: unstuff_test input_test
+clean:
+       $(RM) $(UNSTUFF_TEST_OBJS) unstuff_test
+       $(RM) $(INPUT_TEST_OBJS) input_test
+
+test: tests
+       ./unstuff_test
+       ./input_test