This repository was archived by the owner on Mar 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
97 lines (84 loc) · 2.56 KB
/
Copy pathMakefile
File metadata and controls
97 lines (84 loc) · 2.56 KB
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
##
## EPITECH PROJECT, 2024
## my_rpg
## File description:
## Makefile
##
TARGET = my_rpg
CC = gcc -g3
CXXFLAGS = -g3 -Wall -Werror -Wextra
HSRC = -lcsfml-graphics -lcsfml-audio -lcsfml-system \
-lcsfml-window -lm
HRCS = include
LDFLAGS = -L/opt/homebrew/Cellar/csfml/2.5.2_1/lib/ ${HSRC} \
-Llib/commons/ -lcommons -I $(HRCS)
CPPFLAGS = -I/opt/homebrew/Cellar/csfml/2.5.2_1/include/
BUILD_DIR = build
OBJS = $(addprefix $(BUILD_DIR)/, $(SRCS_FILE:.c=.o))
SRCS_FILE = src/main.c \
src/algorithm/path_finding.c \
src/dialogues/dialogue_npc.c \
src/dialogues/dialogues_parser.c \
src/dialogues/dialogues_registry.c \
src/dialogues/dialogue_player.c \
src/dialogues/dialogues_service.c \
src/dialogues/telep.c \
src/enemy/enemy.c \
src/enemy/enemy_utils.c \
src/enemy/enemy_utils2.c \
src/event/close_event.c \
src/event/event_handler.c \
src/event/input_event.c \
src/event/input_event2.c \
src/game/game_phase.c \
src/game/game_save.c \
src/gui/button/button_registry.c \
src/gui/button/game_menu_buttons.c \
src/gui/interface/back_button.c \
src/gui/interface/main_menu.c \
src/gui/interface/game_menu.c \
src/gui/interface/save_menu.c \
src/gui/interface/settings_menu.c \
src/item/inventory_item.c \
src/map/collision.c \
src/map/map_layers.c \
src/map/rect_from_id.c \
src/map/tiles_manager.c \
src/music/music_player.c \
src/object/tile_object.c \
src/player/player_combat.c \
src/player/player_sprite.c \
src/render/interact_box.c \
src/render/render_window.c \
src/render/resolution_updater.c \
src/render/resolutions.c \
src/scheduler/task_daemon.c \
src/scheduler/task_provider.c \
src/settings/settings_import.c \
src/sound/sound_registry.c \
src/utils/calculate_pos.c \
src/utils/utf8_to_32.c \
src/utils/square_tile_from_pos.c \
src/utils/csfml_str.c \
src/utils/texture_util.c \
src/xp/healthbar.c \
src/xp/xp_manager.c \
src/xp/xp_gui.c \
src/xp/xp_upgrade_gui.c \
all: $(BUILD_DIR) $(TARGET)
$(BUILD_DIR):
mkdir -p $@
$(BUILD_DIR)/%.o: %.c
mkdir -p $(dir $@)
${CC} -c $< -o $@ ${LDFLAGS} ${CPPFLAGS}
$(TARGET): $(OBJS)
@make -C lib/commons
${CC} ${CXXFLAGS} -o $(TARGET) ${OBJS} ${LDFLAGS} ${CPPFLAGS}
re: fclean all
clean:
@make -C lib/commons clean
rm -rf $(BUILD_DIR)
fclean: clean
@make -C lib/commons fclean
rm -f $(TARGET)
.PHONY: all re clean fclean