From 9db52bc5ef545a3fa9973002e9a28a2ece68d029 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 31 Jan 2020 08:08:59 +0100 Subject: Setup unit test with unity --- vendor/_unity/Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 vendor/_unity/Makefile (limited to 'vendor/_unity/Makefile') diff --git a/vendor/_unity/Makefile b/vendor/_unity/Makefile new file mode 100644 index 0000000..d9700ea --- /dev/null +++ b/vendor/_unity/Makefile @@ -0,0 +1,41 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# Makefile :+: :+: :+: # +# +:+ +:+ +:+ # +# By: cacharle +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# Created: 2020/01/31 07:27:12 by cacharle #+# #+# # +# Updated: 2020/01/31 08:39:24 by cacharle ### ########.fr # +# # +# **************************************************************************** # + +CC = gcc +CCFLAGS = -Iinclude -Wall -Wextra -Werror + +NAME = libunity.a + +INCLUDE = $(shell find include -type f -name "*.h") +SRC = $(shell find src -type f -name "*.c") +OBJ = $(SRC:.c=.o) + +.PHONY: all +all: $(NAME) + +$(NAME): $(OBJ) + @echo "Unity: Linking: $@" + @ar rcs $@ $^ + +%.o: %.c $(INCLUDE) + @echo "Unity: Compiling: $@" + @$(CC) $(CCFLAGS) -c -o $@ $< + +clean: + @echo "Unity: Removing objects" + @rm -f $(OBJ) + +fclean: clean + @echo "Unity: Removing: $(NAME)" + @rm -f $(NAME) + +re: fclean all -- cgit