Skip to content

Commit a712ca8

Browse files
Makefile
1 parent 883467b commit a712ca8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

CPP_Module_07/ex00/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# **************************************************************************** #
2+
# #
3+
# ::: :::::::: #
4+
# Makefile :+: :+: :+: #
5+
# +:+ +:+ +:+ #
6+
# By: shovsepy <marvin@42.fr> +#+ +:+ +#+ #
7+
# +#+#+#+#+#+ +#+ #
8+
# Created: 2022/02/01 21:38:04 by shovsepy #+# #+# #
9+
# Updated: 2022/02/01 21:40:25 by shovsepy ### ########.fr #
10+
# #
11+
# **************************************************************************** #
12+
13+
NAME = whatever
14+
15+
SRCS = $(wildcard *.cpp)
16+
OBJS = $(SRCS:.cpp=.o)
17+
18+
CC = c++
19+
CFLAGS = -Wall -Wextra -Werror -std=c++98
20+
21+
all: $(NAME)
22+
23+
.cpp.o:
24+
$(CC) $(CFLAGS) -c $< -o $(<:.cpp=.o)
25+
26+
$(NAME): $(OBJS)
27+
$(CC) $(OBJS) $(CFLAGS) -o $(NAME)
28+
29+
clean:
30+
@$(RM) $(OBJS)
31+
32+
fclean: clean
33+
@$(RM) $(NAME)
34+
35+
re: fclean all
36+
37+
.PHONY: all clean fclean re

0 commit comments

Comments
 (0)