forked from JCTGY/ft_gkrellm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (41 loc) · 1.9 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: jchiang- <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/10/30 19:50:43 by jchiang- #+# #+# #
# Updated: 2020/01/26 22:04:19 by mbutt ### ########.fr #
# #
# **************************************************************************** #
NC:=\033[0m
GREEN:=\033[1;32m
ORANGE:=\033[1;33m
NAME = ft_gkrellm
CFLAG = -std=c++98 -Wall -Wextra -Werror -lncurses
INC = -I includes -I ./SFML/include
SRC = src/src_class/*.cpp
FRAMEWORK = -lncurses -framework sfml-graphics -framework sfml-window -framework sfml-system -F SFML/Frameworks
all: $(NAME)
$(NAME): $(OBJ)
@echo "${ORANGE}Creating the program. Please wait a few seconds.${NC}"
@clang++ $(CFLAG) $(INC) $(SRC) $(FRAMEWORK) -o $(NAME)
@touch ft_gkrellmT
@touch ft_gkrellmG
@echo "DYLD_FRAMEWORK_PATH=`pwd`"/SFML/Frameworks" ./ft_gkrellm Text" >> ft_gkrellmT
@echo "DYLD_FRAMEWORK_PATH=`pwd`"/SFML/Frameworks" ./ft_gkrellm Graph" >> ft_gkrellmG
@chmod 777 ft_gkrellmT
@chmod 777 ft_gkrellmG
@echo "${GREEN}Generated programs ft_gkrellmT & ft_gkrellmG succesfully.${NC}"
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
mkdir -p obj
clang++ -c $(CFLAG) $(INC) $< -o $@
clean:
/bin/rm -rf $(OBJ_DIR)
fclean: clean
/bin/rm -rf $(NAME)
/bin/rm -rf ft_gkrellmT
/bin/rm -rf ft_gkrellmG
re: fclean all
.PHONY: all, clean, fclean, re