aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: dc4e169b48c1c5e1c122f930e7961e311b8dc8c6 (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
33
34
FT_PRINTF_PATH = ../ft_printf

CC = gcc
CCFLAGS = -Wall -Wextra
LDFLAGS = -L$(FT_PRINTF_PATH) -lftprintf
MAKE = make -j4

NAME = ft_printf_test
RM = rm -f

SRC = main.c helper.c moulitest_read_stdout.c
OBJ = $(SRC:.c=.o)

run: all
	./$(NAME)

all: $(NAME)

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

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

clean:
	$(RM) $(OBJ)

fclean: clean
	$(RM) $(NAME)

re: fclean all

ft_printf_all:
	$(MAKE) -C $(FT_PRINTF_PATH) all