feat: init makefile and ignore all .pdf files

This commit is contained in:
2025-09-28 19:56:32 +02:00
parent 5375f5e373
commit 4968e2e29e
2 changed files with 23 additions and 0 deletions

2
.gitignore vendored
View File

@@ -53,3 +53,5 @@ dkms.conf
# debug information files
*.dwo
*.pdf

21
Makefile Normal file
View File

@@ -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)