26 lines
431 B
Makefile
26 lines
431 B
Makefile
|
CXX := g++
|
||
|
CXXFLAGS := -Wall -Wextra -Werror -g
|
||
|
SRCDIR := src
|
||
|
OBJDIR := obj
|
||
|
NAME := PyMenu
|
||
|
|
||
|
SRCS := $(wildcard $(SRCDIR)/*.cpp)
|
||
|
OBJS := $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SRCS))
|
||
|
|
||
|
all: $(NAME)
|
||
|
|
||
|
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||
|
mkdir -p obj
|
||
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||
|
|
||
|
$(NAME): $(OBJS)
|
||
|
$(CXX) $(CXXFLAGS) $^ -o $@ -ldpp
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(OBJDIR)
|
||
|
|
||
|
fclean: clean
|
||
|
rm -fr $(NAME)
|
||
|
|
||
|
re: fclean
|
||
|
@make --no-print-directory all
|