From: Steinar H. Gunderson Date: Fri, 2 Jan 2009 15:48:52 +0000 (+0100) Subject: Add a simple Makefile for compiling and running tests. X-Git-Url: https://git.sesse.net/?p=fjl;a=commitdiff_plain;h=ae2dfff94ee3302e04c37a7fd6ad3722d1babdff Add a simple Makefile for compiling and running tests. --- diff --git a/Makefile b/Makefile new file mode 100644 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