-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
50 lines (39 loc) · 1.15 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
# Fluorite Window Manager
# Version 0.5
# Master Layout but better
BLU = \033[0;34m
GRN = \033[0;32m
RED = \033[0;31m
RST = \033[0m
END = \e[0m
TOTEM = 🦁
FILES = fluorite
SRCS = $(FILES:%=%.c)
NAME = Fluorite
OBJS_DIR = objs/
OBJS = $(SRCS:.c=.o)
OBJECTS_PREFIXED = $(addprefix $(OBJS_DIR), $(OBJS))
CC = gcc
# CC_FLAGS = -O0 -I/usr/include/freetype2 -fsanitize=address -g3
CC_FLAGS = -Wall -Werror -Wextra -O3 -I/usr/include/freetype2
LIBS = -lX11 -lXcursor -lXcomposite -lXft -lXrandr -lxdo
$(OBJS_DIR)%.o : %.c $(PROJECT_H)
@mkdir -p $(OBJS_DIR)
@mkdir -p $(OBJS_DIR)srcs
@$(CC) $(CC_FLAGS) -c $< -o $@
@printf "\033[2K\r${BLU}${TOTEM} [BUILD]${RST} '$<' $(END)"
$(NAME): $(OBJECTS_PREFIXED)
@$(CC) -o $(NAME) $(OBJECTS_PREFIXED) $(CC_FLAGS) $(LIBS) # Program
@printf "\033[2K\r\033[0;32m${TOTEM} [END]\033[0m $(NAME)$(END)\n"
all: $(NAME)
clean:
@rm -rf $(OBJS_DIR)
@printf "\033[2K\r${GRN}${TOTEM} [CLEAN]${RST} done$(END)\n"
fclean: clean
@rm -f $(NAME)
@rm -rf $(OBJS_DIR)
@printf "\033[2K\r${GRN}${TOTEM} [FCLEAN]${RST} done$(END)\n"
re: fclean all
install: re
sudo cp -f ./Fluorite /usr/bin/
.PHONY: all clean fclean re install