-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (43 loc) · 936 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
##
## EPITECH PROJECT, 2018
## Makefile
## File description:
## Compile my bootstrap
##
SRC = ./ai_play.c \
./create_map.c \
./disp_map.c \
./count_matches.c \
./remove_matches.c \
./disp_end.c \
./player_play.c \
./check_nbrs.c \
./matchstick.c \
./check_map.c
SRC_MAIN = ./main.c
OBJ = $(SRC:.c=.o)
OBJ_MAIN = $(SRC_MAIN:.c=.o)
CFLAGS = -W -I./include -g -Wextra -Wall
TFLAGS = --coverage -lcriterion
LDFLAGS = -L ./lib/ -lmy
CC = gcc
NAME = matchstick
BIN = unit_tests
TEST = tests/tests.c
INC = -Iinclude
all: $(NAME)
$(NAME): $(OBJ) $(OBJ_MAIN)
make -sC ./lib/my/
$(CC) -o $(NAME) $(OBJ) $(OBJ_MAIN) $(LDFLAGS) -g
tests_tun:
$(CC) -o $(BIN) $(SRC) $(TEST) $(INC) $(LDFLAGS) $(TFLAGS)
./$(BIN)
clean:
rm -rf $(OBJ)
rm -rf $(OBJ_MAIN)
make -sC ./lib/my/ clean
fclean: clean
rm -rf $(NAME)
rm -rf $(BIN)
make -sC ./lib/my/ fclean
re: fclean all