add: makefile
This commit is contained in:
parent
03fe0a8720
commit
bfda0a7548
24
ex00/Makefile
Normal file
24
ex00/Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
CXX = c++
|
||||
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
|
||||
SRCDIR = src
|
||||
OBJDIR = obj
|
||||
NAME = megaphone
|
||||
|
||||
SRCS = $(wildcard $(SRCDIR)/*.cpp)
|
||||
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(CXX) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
$(NAME): $(OBJS)
|
||||
$(CXX) $(CPPFLAGS) $^ -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR)/*.o
|
||||
|
||||
fclean: clean
|
||||
rm -fr $(NAME)
|
||||
|
||||
re: fclean all
|
0
ex00/obj/.gitkepp
Normal file
0
ex00/obj/.gitkepp
Normal file
0
ex01/obj/.gitkepp
Normal file
0
ex01/obj/.gitkepp
Normal file
Loading…
Reference in New Issue
Block a user