diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-31 08:08:59 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-31 08:48:42 +0100 |
| commit | 9db52bc5ef545a3fa9973002e9a28a2ece68d029 (patch) | |
| tree | 0a1f36d989c6c3cb74e3bc5d5997c6a4c3f058b9 /vendor/_unity/Makefile | |
| parent | 3b884e3836c70b1a19eb7778308fadbc608b0384 (diff) | |
| download | libft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.tar.gz libft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.tar.bz2 libft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.zip | |
Setup unit test with unity
Diffstat (limited to 'vendor/_unity/Makefile')
| -rw-r--r-- | vendor/_unity/Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
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 <marvin@42.fr> +#+ +:+ +#+ # +# +#+#+#+#+#+ +#+ # +# 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 |
