osuplusplus/Makefile

32 lines
569 B
Makefile
Raw Normal View History

2024-03-18 11:25:15 +01:00
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)