-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (54 loc) · 1.2 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
##
## Makefile for tetris in /home/cheval_8/rendu/PSU_2015_tetris
##
## Made by Chevalier Nicolas
## Login <[email protected]>
##
## Started on Wed Feb 24 16:02:04 2016 Chevalier Nicolas
## Last update Thu Apr 14 02:57:08 2016 Chevalier Nicolas
##
NAME = mysh
SRC = main.c \
utils.c \
parser.c \
env/init_listenv.c \
separe.c \
check_command.c \
env/utils_env.c \
my_exec.c \
my_str.c \
my_builtin.c \
my_builtin_cd.c \
my_getnbr.c \
my_free.c \
init.c \
my_puterror.c \
redirection.c \
my_exec_canals.c \
wait.c \
list/list.c
MOD = $(addprefix src/, $(SRC:.c=.o))
LIB = -Llib/
LIB += -Ilib/include -Llib/ -lmyutils
LIBMYUTILS_MAKE = make -C lib/
LIBMYUTILS = lib/libmyutils.a
CFLAGS = -W -Wall -Werror -Wextra
CFLAGS += -Wno-overlength-strings
CFLAGS += -g
CFLAGS += -Iinclude/
CFLAGS += -D_BSD_SOURCE -D_POSIX_SOURCE
CFLAGS += $(LIB)
LDFLAGS = $(LIB)
all: $(LIBMYUTILS) $(NAME)
$(NAME): $(MOD)
@cc $(MOD) -o $(NAME) $(LDFLAGS) -lncurses
$(LIBMYUTILS):
$(LIBMYUTILS_MAKE)
clean :
rm -rf $(MOD)
$(LIBMYUTILS_MAKE) clean
fclean : clean
rm -rf $(NAME)
$(LIBMYUTILS_MAKE) fclean
re: fclean all
.PHONY: all clean fclean re