From 66456b8a0b622bb63297f97eea6349de07db0ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Thu, 21 Jan 2021 11:54:14 +0100 Subject: add makefile --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..42c6bbe --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +SRC = list.c main.c +OBJ = $(SRC:.c=.o) + +all: linked_list + +.c.o: + $(CC) -c $< + +linked_list: $(OBJ) + $(CC) -o $@ $(OBJ) + +run: linked_list + ./linked_list + +valgrind: linked_list + valgrind --tool=memcheck --leak-check=yes ./linked_list + +clean: + rm -f linked_list $(OBJ) + +.PHONY: all run valgrind clean -- cgit v1.2.1