# Compiler settings
CXX = g++
CXXFLAGS = -std=c++11 -I. -Iimgui-docking -IC:/msys64/mingw64/include
LDFLAGS = -LC:/msys64/mingw64/lib -lglfw3 -lopengl32 -lgdi32

# List ImGui source files
IMGUISRCS = imgui-docking/imgui.cpp \
            imgui-docking/imgui_demo.cpp \
            imgui-docking/imgui_draw.cpp \
            imgui-docking/imgui_tables.cpp \
            imgui-docking/imgui_widgets.cpp \
            imgui-docking/imgui_impl_glfw.cpp \
            imgui-docking/imgui_impl_opengl3.cpp

# List all source files
SRCS = main.cpp VoxelGame.cpp GreedyMesher.cpp $(IMGUISRCS)
OBJS = $(SRCS:.cpp=.o)
TARGET = voxelgame

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	rm -f $(OBJS) $(TARGET)
