CC = x86_64-w64-mingw32-g++
CXXFLAGS = -std=c++23 -I/usr/x86_64-w64-mingw32/include -Iinclude -static
LDFLAGS = -lstdc++exp

SOURCES = main.cpp $(wildcard src/*.cpp)
TARGET = build/main.exe

.PHONY: all build run clean

all: build run

build: clean $(TARGET)

$(TARGET): $(SOURCES)
	@mkdir -p build
	@$(CC) $(CXXFLAGS) -o $(TARGET) $(SOURCES) $(LDFLAGS)

run: $(TARGET)
	@WINEDEBUG=fixme-all wine $(TARGET)

clean:
	@rm -rf build
	@rm -rf ../files_moved