From c5d89d1ba78a82e6b31aa498fb0f21c4d527e752 Mon Sep 17 00:00:00 2001 From: leiyu3 Date: Thu, 22 Sep 2022 11:41:31 -0400 Subject: write test up to remove_val --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 14ec6f7..c251fac 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,20 @@ CC=clang CFLAGS=-Wall -g -BINS = vector.o libvector.a main test +BINS = vector.o libvector.a vector_test all: $(BINS) vector.o: vector.h libvector.c $(CC) $(CFLAGS) -c libvector.c libvector.a: libvector.o - ar -cvq libvector.a libvector.o + ar -cvq $@ $< -main: main.c libvector.a - $(CC) $(CFLAGS) -o $@ $^ +vector_test: vector_test.c libvector.a + $(CC) $(CFLAGS) -o $@ $^ -lcriterion -test: test.c - gcc test.c -o test -lcriterion +test: + ./vector_test + +clean: + rm *.o *.a -- cgit v1.2.3