29 lines
294 B
Makefile
29 lines
294 B
Makefile
SRCS = main.c
|
|
|
|
OBJS = ${SRCS:.c=.o}
|
|
|
|
NAME = minishell
|
|
|
|
CC = clang
|
|
|
|
CFLAGS = -Wall -Werror -Wextra
|
|
|
|
%.o: %.c
|
|
${CC} ${CFLAGS} -c -o $@ $<
|
|
|
|
all: ${NAME}
|
|
|
|
${NAME}: ${OBJS}
|
|
${CC} ${OBJS} -o ${NAME}
|
|
|
|
clean:
|
|
rm -f ${OBJS}
|
|
|
|
fclean: clean
|
|
rm -f ${NAME}
|
|
|
|
re: fclean all
|
|
|
|
.PHONY: all clean fclean re
|
|
|