31 lines
569 B
Makefile
31 lines
569 B
Makefile
CXX = g++
|
|
CXXFLAGS = -std=c++20 -O3 -Wall -Wextra -Wpedantic
|
|
CXXFLAGS += -Iinclude
|
|
LDFLAGS = -lsfml-graphics -lsfml-window -lsfml-system
|
|
|
|
NAME = osu++
|
|
|
|
SRC = src
|
|
BIN = target
|
|
|
|
_PROG = HitObjectDrawable.cpp main.cpp osuparser.cpp TextureManager.cpp
|
|
PROG = $(addprefix $(SRC)/, $(_PROG))
|
|
|
|
OBJ = $(_PROG:.cpp=.o)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: dirs $(NAME)
|
|
|
|
dirs:
|
|
mkdir -p $(BIN)
|
|
|
|
$(NAME): $(OBJ)
|
|
$(CXX) $(addprefix $(BIN)/, $^) $(LDFLAGS) -o $(BIN)/$@
|
|
|
|
%.o: src/%.cpp
|
|
$(CXX) -c $< $(CXXFLAGS) -o $(BIN)/$@
|
|
|
|
clean:
|
|
rm -rf $(addprefix $(BIN)/, $(OBJ))
|
|
rm -rf $(BIN)/$(NAME)
|