]> Untitled Git - axy/ft/libft.git/commitdiff
Initial setup
author= <=>
Mon, 27 Oct 2025 10:24:59 +0000 (11:24 +0100)
committer= <=>
Mon, 27 Oct 2025 10:24:59 +0000 (11:24 +0100)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..e0292b1
--- /dev/null
@@ -0,0 +1,2 @@
+*.o
+*.a
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..844d5c5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+NAME=libft.a
+
+SRCS=
+
+OBJS=${SRCS:.c=.o}
+
+CFLAGS=-Wall -Wextra -Werror -O3
+
+CC=cc
+
+all : ${NAME}
+
+%.o : %.c
+       ${CC} ${CFLAGS} -c -o $@ -- $<
+
+${NAME} : ${OBJS}
+       ar -rcs $@ $^
+
+clean : 
+       rm -f ${OBJS}
+
+fclean : clean
+       rm -f ${NAME}
+
+re : fclean all
+
+.PHONY : all clean fclean re