-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
129 lines (110 loc) · 3.26 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
##
## EPITECH PROJECT, 2020
## libmy_sfml
## File description:
## My CSFML library
##
CC = gcc
AR = ar rc
CFLAGS = -W -Wall -Werror -I./include -I../my/include -I../../include -L..
CFLAGS += -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE -std=c99
ifeq ($(EPIDEBUG), 1)
CFLAGS += -Wno-error=init-self -Winit-self
CFLAGS += -Wno-error=shadow -Wshadow
CFLAGS += -Wno-error=pointer-arith -Wpointer-arith
CFLAGS += -Wno-error=duplicated-cond -Wduplicated-cond
CFLAGS += -Wno-error=switch-enum -Wswitch-enum
CFLAGS += -Wno-error=declaration-after-statement -Wdeclaration-after-statement
CFLAGS += -Wno-error=float-equal -Wfloat-equal
CFLAGS += -Wno-error=tautological-compare -Wtautological-compare
CFLAGS += -Wno-error=array-bounds -Warray-bounds
CFLAGS += -Wno-error=alloc-zero -Walloc-zero
CFLAGS += -Wno-error=cast-qual -Wcast-qual
CFLAGS += -Wno-error=extra -Wextra -Wnonnull
CFLAGS += -fno-builtin
CFLAGS += -ftrapv -ggdb -g3
endif
CFLAGS_TEST = ${CFLAGS} -Wno-stringop-truncation --coverage
LFLAGS = -lcsfml-system -lcsfml-graphics -lcsfml-window -lmy
LFLAGS_TEST = ${LFLAGS} -lcriterion
ifeq ($(EPIDEBUG), 1)
CFLAGS += -g3 -ggdb
endif
TESTDIR = ../../tests/lib/my
SRC = src/entities/add_to_entities.c \
src/entities/create_entity.c \
src/entities/entity.c \
src/entities/get_entity_info.c \
src/entities/register_entity.c \
src/entities/move_entity_towards.c \
src/game/game.c \
src/game/close_game.c \
src/game/reset_game_events.c \
src/game/timer.c \
src/graphics/align_text_bottom.c \
src/graphics/align_text_right.c \
src/graphics/center_text_x.c \
src/graphics/center_text_y.c \
src/graphics/create_sprite.c \
src/job/job.c \
src/math/add.c \
src/math/lerp.c \
src/math/magnitude.c \
src/math/normalize.c \
src/math/mulf.c \
src/math/distance.c \
src/math/sub.c \
src/resources/resource.c \
src/resources/texture.c \
src/resources/font.c \
src/resources/sound.c \
src/scene/allocate_scene.c \
src/scene/await_scene.c \
src/scene/destroy_scene.c \
src/scene/draw_scene.c \
src/scene/update_scene.c \
src/scene/register_scene.c \
src/scene/load_pending_scene.c \
src/scene/has_pending_scene.c \
src/scene/is_scene_updated.c \
src/scene/switch_to_scene.c \
src/scene/set_pending_scene.c \
src/scene/get_scene_info.c \
src/scene/load_pending_scene.c \
src/scene/transmit_event_to_scene.c \
src/window/create_standard_window.c \
src/sound/sound_emitter.c \
src/sound/destroy_sound_emitter.c \
src/hashmap/create.c \
src/hashmap/destroy.c \
src/hashmap/getindex.c \
src/hashmap/resize.c \
src/hashmap/set.c \
src/hashmap/unset.c \
src/hashmap/get.c \
src/hashmap/list.c \
src/input/input.c \
src/input/keyboard.c \
src/animable/get_animable_frame.c \
src/animable/set_animable_frame.c \
src/animable/get_animable_animation.c \
src/animable/set_animable_animation.c \
src/animable/is_animation_done.c \
src/animable/set_animable_info.c
TEST_FILES = \
OBJ = ${SRC:.c=.o}
TARGET = libdistract.a
all: ${TARGET} clean
${TARGET}: ${OBJ}
${AR} ${TARGET} ${OBJ}
cp ${TARGET} ../
mkdir -p ../../include
mkdir -p ../../include/distract
cp -rf ./include/distract/*.h ../../include/distract
coverage: test
gcovr
clean:
rm -f *.gc* unit_test
fclean: clean
rm -f ${TARGET} ${OBJ}
re: fclean all