From 4968e2e29e7312d92e7974f9c60056f35d1526b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GUEZO?= Date: Sun, 28 Sep 2025 19:56:32 +0200 Subject: [PATCH] feat: init makefile and ignore all .pdf files --- .gitignore | 2 ++ Makefile | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 845cda6..98109dc 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ dkms.conf # debug information files *.dwo + +*.pdf \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..581e10a --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# .SILENT: +.PHONY: all clean +.DEFAULT_GOAL := all + +SRC = $(wildcard *.c) +LIB = libft.a +STATIC = ar -rcs +CC = clang +OBJ = $(SRC:.c=.o) +CFLAGS = -Wall -Wextra -Werror -pedantic + +$(LIB): $(OBJ) # <--- OBJ will run $.o: %.c pattern + $(STATIC) $(LIB) $(OBJ) + +%.o: %.c # <--- compile any .c file into its corresponding .o automatically + ${CC} ${CFLAGS} -c $< -o $@ + +all: $(LIB) + +clean: + rm -f $(OBJ) $(LIB)