add: ex04
This commit is contained in:
parent
3ef324e5e1
commit
5d687d7c28
25
ex04/Makefile
Normal file
25
ex04/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
CXX = c++
|
||||
CPPFLAGS = -std=c++98 -Wall -Wextra -Werror -g
|
||||
SRCDIR = src
|
||||
OBJDIR = obj
|
||||
NAME = sed
|
||||
|
||||
SRCS = $(wildcard $(SRCDIR)/*.cpp)
|
||||
OBJS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
mkdir -p obj
|
||||
$(CXX) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
$(NAME): $(OBJS)
|
||||
$(CXX) $(CPPFLAGS) $^ -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR)/*.o
|
||||
|
||||
fclean: clean
|
||||
rm -fr $(NAME)
|
||||
|
||||
re: fclean all
|
Loading…
Reference in New Issue
Block a user