-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (38 loc) · 850 Bytes
/
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
##
## EPITECH PROJECT, 2023
## my_sokoban
## File description:
## Makefile
##
CC = gcc
SRCS = src/main.c \
src/errors.c \
src/map/map_parser.c \
src/map/map_manager.c \
src/map/map_checker.c \
src/render/game_render.c \
src/render/window_render.c \
src/util/file_info_reader.c \
lib/count_char_str.c \
lib/my_str_contain.c \
lib/my_strlen.c \
lib/my_strcpy.c \
lib/my_str_equals.c \
HRCS = include
TARGET = my_sokoban
BUILD_DIR = build
OBJS = $(addprefix $(BUILD_DIR)/, $(SRCS:.c=.o))
all: $(BUILD_DIR) $(TARGET)
$(BUILD_DIR):
mkdir -p $@
$(BUILD_DIR)/%.o: %.c
mkdir -p $(dir $@)
$(CC) -c $< -o $@
$(TARGET): $(OBJS)
$(CC) -o $(TARGET) $(OBJS) -lncurses
re: fclean all
clean:
rm -f $(OBJS)
rm -rf $(BUILD_DIR)
fclean: clean
rm -f $(TARGET)