aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 14ec6f7..c251fac 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,20 @@
1CC=clang 1CC=clang
2CFLAGS=-Wall -g 2CFLAGS=-Wall -g
3 3
4BINS = vector.o libvector.a main test 4BINS = vector.o libvector.a vector_test
5all: $(BINS) 5all: $(BINS)
6 6
7vector.o: vector.h libvector.c 7vector.o: vector.h libvector.c
8 $(CC) $(CFLAGS) -c libvector.c 8 $(CC) $(CFLAGS) -c libvector.c
9 9
10libvector.a: libvector.o 10libvector.a: libvector.o
11 ar -cvq libvector.a libvector.o 11 ar -cvq $@ $<
12 12
13main: main.c libvector.a 13vector_test: vector_test.c libvector.a
14 $(CC) $(CFLAGS) -o $@ $^ 14 $(CC) $(CFLAGS) -o $@ $^ -lcriterion
15 15
16test: test.c 16test:
17 gcc test.c -o test -lcriterion 17 ./vector_test
18
19clean:
20 rm *.o *.a