-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (49 loc) · 987 Bytes
/
Makefile
File metadata and controls
65 lines (49 loc) · 987 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
NAME = ft_script
SRCFILES = exit.c \
file_op.c \
main.c \
pty.c \
record.c \
record_done.c \
record_input.c \
record_output.c \
record_pre.c \
record_shell.c \
record_wait.c \
record_write.c \
replay.c \
replay_start_end.c \
term.c
OBJFILES = $(SRCFILES:%.c=%.o)
SRC = $(addprefix src/,$(SRCFILES))
OBJ = $(addprefix obj/,$(OBJFILES))
CC = gcc
CFLAGS += -O2 -Wextra -Wall -Werror
INC = -I libft/inc -I inc/
LIBFT = libft/libft.a
all:$(NAME)
$(NAME): $(OBJ) | $(LIBFT)
$(CC) $(CFLAGS) -o $@ $^ $(LIBFT)
libft/libft.a:
make -C libft/
objdir:
mkdir -p obj/
obj/%.o: src/%.c | objdir
$(CC) $(CFLAGS) -c $< -o $@ $(INC)
rmobj:
rm -rf obj/
rmbin:
rm -rf $(NAME)
again: rmobj rmbin all
clean: rmobj
make clean -C libft/
fclean: clean rmbin
make fclean -C libft/
re: fclean all
norminette:
norminette src/
norminette inc/
norminette libft/src/
norminette libft/inc
norme: norminette
norm: norminette