aboutsummaryrefslogtreecommitdiff
path: root/script/template.makefile
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-31 08:08:59 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-31 08:48:42 +0100
commit9db52bc5ef545a3fa9973002e9a28a2ece68d029 (patch)
tree0a1f36d989c6c3cb74e3bc5d5997c6a4c3f058b9 /script/template.makefile
parent3b884e3836c70b1a19eb7778308fadbc608b0384 (diff)
downloadlibft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.tar.gz
libft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.tar.bz2
libft-9db52bc5ef545a3fa9973002e9a28a2ece68d029.zip
Setup unit test with unity
Diffstat (limited to 'script/template.makefile')
-rw-r--r--script/template.makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/script/template.makefile b/script/template.makefile
new file mode 100644
index 0000000..b0902ec
--- /dev/null
+++ b/script/template.makefile
@@ -0,0 +1,38 @@
+# **************************************************************************** #
+# #
+# ::: :::::::: #
+# Makefile :+: :+: :+: #
+# +:+ +:+ +:+ #
+# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
+# +#+#+#+#+#+ +#+ #
+# Created: 2019/10/08 15:45:53 by cacharle #+# #+# #
+# Updated: 2020/01/31 06:51:18 by cacharle ### ########.fr #
+# #
+# **************************************************************************** #
+
+RM = rm -f
+LIB = ar rcs
+
+CC = gcc
+CCFLAGS = -Iinclude -Wall -Wextra -Werror
+
+#INSERTSRC
+
+OBJ = $(SRC:.c=.o)
+NAME = libft.a
+
+all: $(NAME)
+
+$(NAME): $(OBJ)
+ $(LIB) $@ $(OBJ)
+
+%.o: %.c
+ $(CC) $(CCFLAGS) -c -o $@ $<
+
+clean:
+ $(RM) -r $(OBJ_DIR)
+
+fclean: clean
+ $(RM) $(NAME)
+
+re: fclean all