-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1001 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 1001 Bytes
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
35
36
37
38
39
40
41
42
CFLAGS = -Wall -Wextra -Werror
NAME = push_swap
BNAME = checker
SRCS := main.c parcing.c ft_split.c lst_utils.c lst_utils2.c lst_utils3.c \
lst-manipulation.c operations.c operations2.c simple_sorts.c \
advanced_sorts.c utils.c utils2.c
BSRCS = main.c parcing.c ft_split.c lst_utils.c lst_utils2.c lst_utils3.c \
lst-manipulation.c operations.c operations2.c \
utils.c utils2.c do_ops.c get_next_line.c
OBJS = $(addprefix srcs/, $(SRCS:.c=.o))
BOBJS = $(addprefix bonus/, $(BSRCS:.c=.o))
all: printf $(NAME)
bonus: $(BNAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) srcs/ft_printf/libftprintf.a -o $(NAME)
$(BNAME): $(BOBJS)
$(CC) $(CFLAGS) $(BOBJS) -o $(BNAME)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -MMD
printf:
make -C srcs/ft_printf/
clean:
make clean -C srcs/ft_printf/
$(RM) $(OBJS) $(OBJS:.o=.d) $(BOBJS) $(BOBJS:.o=.d)
fclean: clean
make fclean -C srcs/ft_printf/
$(RM) $(NAME) $(BNAME)
re: fclean all
.PHONY: clean printf
-include $(OBJS:.o=.d)
-include $(BOBJS:.o=.d)