-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (42 loc) · 1.66 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tbalu <tbalu@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2015/11/26 18:04:58 by adubois #+# #+# #
# Updated: 2016/03/23 14:58:45 by tbalu ### ########.fr #
# #
# **************************************************************************** #
NAME = wolf3d
CC = gcc
CFLAGS = -Wall -Werror -Wextra -g -O0
INC_PATH = -I./inc/ -I./libft/ -I./minilibx_macos/
SRC_PATH = ./src/
SRCS = main.c image.c constructor.c events.c color.c vector.c draw_image.c \
events_2.c loader.c paste_texture.c key_release.c key_press.c \
draw_map.c formula.c
FLAGSMLX = -L minilibx_macos/ -lmlx -framework OpenGL -framework AppKit
FLAGSLIBFT = -L libft/ -lft
SRC = $(SRCS:%.c=$(SRC_PATH)%.c)
OBJ = $(SRC:%.c=%.o)
all: mlx lft $(NAME)
$(NAME): $(OBJ)
$(CC) -o $(NAME) $(OBJ) $(FLAGSLIBFT) $(FLAGSMLX)
mlx:
make -C minilibx_macos/
lft:
make -C libft/
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS) $(INC_PATH)
clean:
rm -f $(OBJ)
make -C libft/ clean
fclean: clean
rm -f $(NAME)
make -C minilibx_macos/ clean
make -C libft/ fclean
memclean:
rm -rf *~
re: fclean all