-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 1.54 KB
/
Copy pathMakefile
File metadata and controls
46 lines (36 loc) · 1.54 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: dporhomo <dporhomo@student.42prague.com +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2026/06/08 20:21:00 by dporhomo #+# #+# #
# Updated: 2026/06/15 13:39:57 by dporhomo ### ########.fr #
# #
# **************************************************************************** #
NAME = codexion
CC = cc
CFLAGS = -Wall -Wextra -Werror -pthread
# CFLAGS = -Wall -Wextra -Werror -pthread -fsanitize=thread -g
SRCS = dongles.c init.c logger.c main.c state_utils.c \
monitor.c parser.c pq_core.c routine.c state_utils_set.c \
pq_utils.c time_utils.c clean_utils.c arbitrator.c
OBJ_DIR = obj/
OBJS = $(addprefix $(OBJ_DIR), $(SRCS:.c=.o))
# OBJS = $(SRCS:.c=.o)
all: $(NAME)
$(NAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(NAME)
$(OBJ_DIR)%.o: %.c
@mkdir -p $(OBJ_DIR)
$(CC) $(CFLAGS) -c $< -o $@
# %.o: %.c
# $(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(OBJ_DIR)
# rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re