-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (36 loc) · 1.03 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
##
## EPITECH PROJECT, 2023
## B_NWP_400_STG_4_1_myftp_remi_mergen
## File description:
## Makefile
##
SRC := $(shell find source/ -name "*.c")
SRC_DIR := source/
BUILD_DIR := build/
INCLUDE_DIR := include/
OBJECTS := $(addprefix $(BUILD_DIR), $(SRC:$(SRC_DIR)%.c=%.o))
BINARY := panoramix
# Compiler flags
CFLAGS := -lpthread -ggdb
# Warning flags
CFLAGS += -Wall -Wextra -Wpedantic
all: $(BINARY)
$(BUILD_DIR)%.o: $(SRC_DIR)%.c
@mkdir -p $(dir $@)
@gcc $(CFLAGS) -I$(INCLUDE_DIR) -c $< -o $@
$(BINARY): $(OBJECTS)
@gcc $(OBJECTS) $(CFLAGS) -o $(BINARY)
@echo "\e[38;5;28m================ Compiling: Done =======\
=========\e[0;0m"
clean:
@rm -rf $(OBJECTS)
@rm -f *vgcore.*
@echo "\e[38;5;39m================ Clean: Done =========\
=======\e[0;0m"
fclean: clean
@rm -rf $(BINARY)
@rm -rf $(BUILD_DIR)
@echo "\e[38;5;202m================ Fclean: Done ==========\
======\e[0;0m"
re: fclean all
.PHONY: re clean fclean all