aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 7011d897dda8bf921952c96cc5b04df2840a1d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CC = gcc
CCFLAGS = -Wall -Wextra #-Werror

RM = rm -f

NAME = ft_printf
SRC = ft_printf.c utils.c printer.c parse.c list.c extract.c
OBJ = $(SRC:.c=.o)
INCLUDE = header.h

all: $(NAME)

debug: CCFLAGS += -g -fsanitize=address
debug: re

$(NAME): $(OBJ)
	$(CC) $(CCFLAGS) -o $@ $(OBJ)

%.o: %.c $(INCLUDE)
	$(CC) $(CCFLAGS) -c -o $@ $<

clean:
	$(RM) $(OBJ)

fclean: clean
	$(RM) $(OBJ)

re: fclean all

test: fclean
	make -C ../schooltest
	../schooltest/all_tests