include 3rdparty/glfw.pro
include 3rdparty/freetype.pro

TARGET    = example_glfw_opengl3
IMGUI_DIR = ../.modules/imgui
CXXFLAGS  = -std=c++14 -fno-exceptions -fno-rtti -Os -s -static
SOURCES   = $(IMGUI_DIR)/examples/example_glfw_opengl3/main.cpp \
            $(IMGUI_DIR)/imgui.cpp \
            $(IMGUI_DIR)/imgui_demo.cpp \
            $(IMGUI_DIR)/imgui_draw.cpp \
            $(IMGUI_DIR)/imgui_tables.cpp \
            $(IMGUI_DIR)/imgui_widgets.cpp \
            $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp \
            $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp \
            $(IMGUI_DIR)/misc/freetype/imgui_freetype.cpp
INCLUDES  = $(IMGUI_DIR) \
            $(IMGUI_DIR)/backends \
            ../$(OUTPUT_DIR)/install/usr/local/include \
            ../.modules/freetype/include \
            ../$(OUTPUT_DIR)/install/usr/local/include/freetype2

# Platform specific OpenGL libraries
ifeq ($(PLATFORM),Windows)
  INCLUDES  += src/Vulkan/sdk
  GL_LFLAGS := -lopengl32 -lglu32 -lkernel32 -lgdi32 -luser32 -limm32
endif
ifeq ($(PLATFORM),Darwin)
  GL_LFLAGS := -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
endif
ifeq ($(PLATFORM),Linux)
  GL_LFLAGS := -lGL -lGLU -ldl -lm -pthread
endif

LIBS = $(GL_LFLAGS) $(GLFW_LIB) $(FT2_LIB)

bin/example_glfw_opengl3: $(GLFW_LIB) $(FT2_LIB)

