-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·110 lines (100 loc) · 3.24 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: ebednar <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/11/20 14:23:06 by twitting #+# #+# #
# Updated: 2019/04/15 16:28:16 by ebednar ### ########.fr #
# #
# **************************************************************************** #
NAME = doom-nukem
SRC = ./src/main.c \
./src/parser.c \
./src/vector_funcs.c \
./src/engine.c \
./src/init.c \
./src/events.c \
./src/movement.c \
./src/textures.c \
./src/scaler.c \
./src/sprites.c \
./src/buttons.c \
./src/shoot.c \
./src/mobattack.c \
./src/transparent.c \
./src/movemob.c \
./src/walls.c \
./src/key.c \
./src/walls2.c \
./src/wallintersect.c \
./src/light.c \
./src/lightswitch.c \
./src/rotatinglight.c \
./src/spritedist.c \
./src/findbutton.c \
./src/portal.c \
./src/openbars.c \
./src/vlines.c \
./src/walls3.c \
./src/menu/main.c \
./src/menu/handle_pause.c \
./src/menu/handle_menu.c \
./src/menu/handle_load.c \
./src/menu/handle_save.c \
./src/menu/handle_game_mode.c \
./src/menu/game_over.c \
./src/menu/menu_pause.c \
./src/menu/game_mode.c \
./src/menu/save_game.c \
./src/menu/load_game.c \
./src/game_bar/help.c \
./src/game_bar/key.c \
./src/game_bar/head.c \
./src/game_bar/bar.c \
./src/game_bar/hp.c \
./src/support1.c \
./src/support2.c \
./src/support3.c \
./src/support4.c \
./src/support5.c \
./src/support6.c \
./src/support7.c
LIBFT = ./libft/libft.a
OBJECTS = $(SRC:.c=.o)
WWW = -Wall -Wextra -Werror -Ofast
INCLUDES = -I libft -I includes/ \
-I includes/frameworks/SDL2.framework/Versions/A/Headers \
-I includes/frameworks/SDL2_image.framework/Versions/A/Headers \
-I includes/frameworks/SDL2_ttf.framework/Versions/A/Headers \
-I includes/frameworks/SDL2_mixer.framework/Versions/A/Headers
SDL = -F includes/frameworks/ -framework SDL2 \
-framework SDL2_image \
-framework SDL2_ttf \
-framework SDL2_mixer
FLAGS_LINUX = -I ./includes/ -I includes/frameworks/SDL2.framework/Versions/A/Headers -I \
includes/frameworks/SDL2_image.framework/Versions/A/Headers -lm -lpthread -lSDL2main -lSDL2 -I libft -lSDL2_image
all: $(NAME)
linux:
make re -C libft/
make re -C kiss_sdl/
make re -C map_editor/
sudo gcc $(WWW) $(SRC) $(LIBFT) $(FLAGS_LINUX) -o $(NAME)
$(NAME): $(OBJECTS)
make -C libft/
make -C map_editor/
make -C kiss_sdl/
gcc -o $(NAME) $(OBJECTS) $(INCLUDES) $(SDL) $(LIBFT)
%.o: %.c
gcc $(WWW) $(INCLUDES) -c $< -o $@ -F includes/frameworks/
clean:
make clean -C libft/
make clean -C map_editor/
/bin/rm -f $(OBJECTS)
fclean: clean
make fclean -C libft/
make fclean -C map_editor/
/bin/rm -f $(NAME)
re: fclean all
re_linux: fclean linux