-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (33 loc) · 788 Bytes
/
Makefile
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
43
44
45
46
47
NAME = binary
SRC = ./srcs/binary_crypto.c \
./srcs/binary_read_chaine.c \
./srcs/binary_reader.c \
./srcs/binary_spe.c \
./srcs/binary_utils.c \
./srcs/binary_write_chaine.c \
./srcs/binary_writer.c \
./srcs/binary_unsigned_reader.c \
./srcs/binary.c \
./srcs/garbage_memory.c \
./main_read.c \
OBJ = $(SRC:.c=.o)
DEPS = $(OBJ:.o=.d)
CC = clang
CFLAGS = -Wall -Werror -Wextra
all: $(NAME)
%.o: %.c
${CC} ${CFLAGS} -g3 -Wuninitialized -Winit-self -MMD -Iincludes -c $< -o $@
$(NAME) : $(OBJ)
$(MAKE) -C libft
$(CC) $(OBJ) -Llibft -lft -o $(NAME)
clean:
rm -f $(OBJ)
rm -f $(DEPS)
$(MAKE) -C libft clean
norm:
norminette ./srcs/ ./includes ./libft
fclean: clean
rm -f $(NAME) libft/libft.a
re: fclean all
.PHONY: all clean norm fclean re
-include $(DEPS)