|
|
|
@ -21,15 +21,19 @@ SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui
|
|
|
|
|
SOURCES += $(IMGUI_DIR)/backends/imgui_impl_sdl.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
|
|
|
|
|
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
|
LINUX_GL_LIBS = -lGL
|
|
|
|
|
|
|
|
|
|
CXXFLAGS = -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends
|
|
|
|
|
CXXFLAGS += -g -Wall -Wformat
|
|
|
|
|
LIBS =
|
|
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------
|
|
|
|
|
## OPENGL LOADER
|
|
|
|
|
## OPENGL LOADER / OPENGL ES
|
|
|
|
|
##---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
## See below for OpenGL ES option (no loader required) - comment out
|
|
|
|
|
## the following if you want to use OpenGL ES instead of Desktop GL.
|
|
|
|
|
|
|
|
|
|
## Using OpenGL loader: gl3w [default]
|
|
|
|
|
SOURCES += ../libs/gl3w/GL/gl3w.c
|
|
|
|
|
CXXFLAGS += -I../libs/gl3w -DIMGUI_IMPL_OPENGL_LOADER_GL3W
|
|
|
|
@ -56,13 +60,21 @@ CXXFLAGS += -I../libs/gl3w -DIMGUI_IMPL_OPENGL_LOADER_GL3W
|
|
|
|
|
# CXXFLAGS += -DIMGUI_IMPL_OPENGL_LOADER_GLBINDING2
|
|
|
|
|
# LIBS += -lglbinding
|
|
|
|
|
|
|
|
|
|
## Using OpenGL ES, no loader required
|
|
|
|
|
## This assumes a GL ES library available in the system, e.g. libGLESv2.so
|
|
|
|
|
# CXXFLAGS += -DIMGUI_IMPL_OPENGL_ES2
|
|
|
|
|
# LINUX_GL_LIBS = -lGLESv2
|
|
|
|
|
## If you're on a Raspberry Pi and want to use the legacy drivers,
|
|
|
|
|
## use the following instead:
|
|
|
|
|
# LINUX_GL_LIBS = -L/opt/vc/lib -lbrcmGLESv2
|
|
|
|
|
|
|
|
|
|
##---------------------------------------------------------------------
|
|
|
|
|
## BUILD FLAGS PER PLATFORM
|
|
|
|
|
##---------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
ifeq ($(UNAME_S), Linux) #LINUX
|
|
|
|
|
ECHO_MESSAGE = "Linux"
|
|
|
|
|
LIBS += -lGL -ldl `sdl2-config --libs`
|
|
|
|
|
LIBS += $(LINUX_GL_LIBS) -ldl `sdl2-config --libs`
|
|
|
|
|
|
|
|
|
|
CXXFLAGS += `sdl2-config --cflags`
|
|
|
|
|
CFLAGS = $(CXXFLAGS)
|
|
|
|
|