-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
70 lines (57 loc) · 1.88 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
# Copyright (C) 2024 Ismael Benjara
#
# This file is part of eve.
#
# eve is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# eve is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with eve. If not, see <https://www.gnu.org/licenses/>.
NAME := eve
CC := gcc
FLAGS := -Wall -Werror -Wextra -pedantic -std=c99
SRC_DIR := src
SRC_FILES := main.c \
append_buffer.c \
editor_operations.c \
find.c \
options.c \
file/file_io.c \
file/save_file_operations.c \
input/input.c \
input/input_2.c \
input/input_3.c \
input/input_4.c \
input/key_handlers.c \
output/output.c \
output/output_2.c \
row_operations/row_operations.c \
row_operations/row_operations_2.c \
syntax_highlighting/syntax_highlighting.c \
syntax_highlighting/syntax_highlighting_2.c \
syntax_highlighting/syntax_highlighting_3.c \
terminal/terminal.c \
terminal/terminal_2.c \
terminal/terminal_3.c
OBJ_DIR := objs
OBJS := $(addprefix $(OBJ_DIR)/, $(SRC_FILES:.c=.o))
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
@mkdir -p `dirname $@`
$(CC) $(FLAGS) -c -o $@ $<
all: $(NAME)
$(NAME): $(OBJS)
@echo
$(CC) $(FLAGS) -o $@ $^
clean:
rm -Rf $(OBJ_DIR)/
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re