summaryrefslogtreecommitdiff
path: root/Makefile
blob: e26945537808edfc8057fcb39f26b6a9943e222f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CC = cc
CFLAGS = -Wall -Werror -Wextra -g
SRCS = ft_printf.c ft_putnbr.c ft_putstr.c ft_putchar.c ft_putunsigned.c ft_puthexlower.c ft_puthexupper.c ft_checkpadd.c
OBJS = $(SRCS:.c=.o)
NAME = libftprintf.a
DEPS = ft_printf.h

%.o : %.c $(DEPS)
	$(CC) -c -o $@ $< $(CFLAGS) 

$(NAME) : $(OBJS)
	ar rcs $(NAME) $(OBJS)

all: $(NAME) 

.PHONY: clean fclean re

clean:
	rm -f *.o
fclean: clean 
	rm -f $(NAME)
re: fclean all