diff --git a/0x1C-makefiles/4-Makefile b/0x1C-makefiles/4-Makefile new file mode 100644 index 0000000..a109449 --- /dev/null +++ b/0x1C-makefiles/4-Makefile @@ -0,0 +1,22 @@ +CC = gcc +CFLAGS = -Wall -Werror -Wextra -pedantic +SRC = main.c school.c +OBJ = $(patsubst %.c,%.o,$(SRC)) +NAME = school +RM = rm -f + +all : $(OBJ) + $(CC) $(OBJ) -o $(NAME) + +%.o : %.c + $(CC) $(CFLAGS) -c -o $@ $^ + +clean : + $(RM) *~ $(NAME) + +oclean : + $(RM) -f $(OBJ) + +fclean: clean oclean + +re: oclean all \ No newline at end of file