-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (48 loc) · 1.11 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 LemiPC in /home/jibb/rendu/PSU_2014_lemipc
##
## Made by Jean-Baptiste Grégoire
## Login <jibb@epitech.net>
##
## Started on Fri Feb 27 11:27:47 2015 Jean-Baptiste Grégoire
## Last update Sun Mar 8 23:17:16 2015 Jean-Baptiste Grégoire
##
DEBUG = no
NAME = lemipc
GRAPHIC = graphic_lemipc
SRC = src/main.c \
src/control_map.c \
src/create_ia.c \
src/destroy.c \
src/ia.c \
src/ia_easy.c \
src/ia_utils.c \
src/ia_move.c \
src/signal.c
SRC_GRAPH = src_graphic/graphic_main.c \
src_graphic/graphic_setpos.c \
OBJ = $(SRC:.c=.o)
OBJ_GRAPH = $(SRC_GRAPH:.c=.o)
RM = rm -f
CC = gcc
INCLUDES = includes/
FOLDER_SRC = src/
CFLAGS = -W -Wall -Wextra -I $(INCLUDES)
ifeq ($(DEBUG),yes)
CFLAGS += -g3
else
CFLAGS += -O3
endif
$(NAME): $(OBJ)
$(CC) -o $(NAME) $(OBJ) -pthread -lm
$(GRAPHIC): $(OBJ_GRAPH)
$(CC) $(CFLAGS) -o $(GRAPHIC) $(OBJ_GRAPH) -lSDL -lSDLmain -lSDL_gfx -lSDL_image -pthread
graphic: $(GRAPHIC)
all: $(NAME)
clean:
$(RM) $(OBJ)
$(RM) $(OBJ_GRAPH)
fclean: clean
$(RM) $(NAME)
re: fclean all graphic
.PHNOY: re fclean clean all