aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorleiyu3 <s444814187@gmail.com>2022-09-22 11:41:31 -0400
committerleiyu3 <s444814187@gmail.com>2022-09-22 11:41:31 -0400
commitc5d89d1ba78a82e6b31aa498fb0f21c4d527e752 (patch)
tree5ac5f694efc95a207dc06e8001003c045982f97c /Makefile
parentc1baa76ee589ab8158a9f1fb3173149cebe1dd1b (diff)
downloadvector_c-c5d89d1ba78a82e6b31aa498fb0f21c4d527e752.tar.gz
vector_c-c5d89d1ba78a82e6b31aa498fb0f21c4d527e752.zip
write test up to remove_val
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