-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (40 loc) · 1.71 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: twitting <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/20 14:23:06 by twitting #+# #+# #
# Updated: 2019/02/27 15:52:41 by twitting ### ########.fr #
# #
# **************************************************************************** #
NAME = wolf3d
SRC = ./wolf_src/getintmap.c \
./wolf_src/main.c \
./wolf_src/raycaster.c \
./wolf_src/userinput.c \
./wolf_src/texture.c \
./wolf_src/sprites.c
SRC2 = ./libft/libft.a
OBJECTS = $(SRC:.c=.o)
FLAGS = -Wall -Wextra -Werror
FLAGS2 = -I includes -I libft -I /usr/local/include -L /usr/local/lib -lmlx -lpthread -framework OpenGL -framework AppKit
FLAGS_LINUX = -I ./includes/ /usr/X11/lib/libmlx.a -lXext -lX11 -lm -lpthread
all: $(NAME)
linux:
make re -C libft/
sudo gcc $(FLAGS) $(SRC) $(SRC2) $(FLAGS_LINUX) -o $(NAME)
$(NAME): $(OBJECTS)
make -C libft/
gcc -g $(FLAGS) $(FLAGS2) $(OBJECTS) $(SRC2) -o $(NAME)
%.o: %.c
gcc $(FLAGS) -I includes -I libft -c $< -o $@
clean:
make clean -C libft/
/bin/rm -f $(OBJECTS)
fclean: clean
make fclean -C libft/
/bin/rm -f $(NAME)
re: fclean all
re_linux: fclean linux