Skip to content

Commit

Permalink
Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Walid Araissi committed Nov 18, 2022
1 parent ce83986 commit 6459e22
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ CC = cc
SRC = get_next_line.c\
get_next_line_utils.c

BNS = get_next_line_bonus.c\
get_next_line_utils_bonus.c

OBJ = ${SRC:.c=.o}

BOBJ = ${BNS:.c=.o}

all: ${NAME}

${NAME}: ${OBJ}
${AR} ${NAME} ${OBJ}

%.o: %.c get_next_line.h
bonus: all ${BOBJ}
${AR} ${NAME} ${BOBJ}

%.o: %.c get_next_line.h get_next_line_bonus.h
${CC} ${FLAGS} -c $<

clean:
rm -f ${OBJ}
rm -f ${OBJ} ${BOBJ}

fclean: clean
rm -f ${NAME}
Expand Down

0 comments on commit 6459e22

Please sign in to comment.