From 7c9898f82201f5918c9934c06953f854ddf470ad Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 16 Oct 2026 02:34:57 +0800 Subject: Add lab04 Signed-off-by: Richard Qin --- lab04/tests/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lab04/tests/Makefile (limited to 'lab04/tests/Makefile') diff --git a/lab04/tests/Makefile b/lab04/tests/Makefile new file mode 100644 index 0000000..5724f6f --- /dev/null +++ b/lab04/tests/Makefile @@ -0,0 +1,18 @@ +CC ?= gcc +CFLAGS ?= -std=gnu11 -Wall -Wextra -Werror -O2 +LDLIBS ?= -lm + +TARGET := test_runner + +.PHONY: all run clean + +all: $(TARGET) + +$(TARGET): test.c ../container_of.h ../list.h ../vec.h ../polynomial.h ../expression.h ../stack.h + $(CC) $(CFLAGS) -I.. test.c $(LDLIBS) -o $@ + +run: $(TARGET) + ./$(TARGET) + +clean: + rm -f $(TARGET) -- cgit v1.2.3