-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (33 loc) · 1.35 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: bgoron <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/19 14:19:00 by bgoron #+# #+# #
# Updated: 2024/10/20 16:06:14 by bgoron ### ########.fr #
# #
# **************************************************************************** #
NAME = libbigint.a
SRCDIR = src
INCDIR = inc
OBJDIR = src/.obj
CXX = g++
CXXFLAGS = -Wall -Wextra -Werror -std=c++98 -I$(INCDIR)
SRCS = $(wildcard $(SRCDIR)/*.cpp)
OBJS = $(SRCS:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
all: $(NAME)
$(NAME): $(OBJS)
@ar rcs $(NAME) $(OBJS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | $(OBJDIR)
@$(CXX) $(CXXFLAGS) -c $< -o $@
$(OBJDIR):
@mkdir -p $(OBJDIR)
clean:
@rm -rf $(OBJDIR)
fclean: clean
@rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re
.SILENT: