@ -8,27 +8,42 @@ SOURCES = main.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $( addsuffix .o, $( basename $( notdir $( SOURCES) ) ) )
UNAME_S := $( shell uname -s)
EXTRA_WARNINGS ?= 0
CXXFLAGS = -I../ -I../../
CXXFLAGS += -g -Wall -Wformat
LIBS =
# We use the EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
i f e q ( $( EXTRA_WARNINGS ) , 1 )
CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
e n d i f
##---------------------------------------------------------------------
## BUILD FLAGS PER PLATFORM
##---------------------------------------------------------------------
i f e q ( $( UNAME_S ) , L i n u x ) #LINUX
ECHO_MESSAGE = "Linux"
ifneq ( $( EXTRA_WARNINGS) , 0)
CXXFLAGS += -Wextra -pedantic
endif
CFLAGS = $( CXXFLAGS)
e n d i f
i f e q ( $( UNAME_S ) , D a r w i n ) #APPLE
ECHO_MESSAGE = "Mac OS X"
ifneq ( $( EXTRA_WARNINGS) , 0)
CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long
endif
CFLAGS = $( CXXFLAGS)
e n d i f
i f e q ( $( findstring MINGW ,$ ( UNAME_S ) ) , M I N G W )
ECHO_MESSAGE = "MinGW"
ifneq ( $( EXTRA_WARNINGS) , 0)
CXXFLAGS += -Wextra -pedantic
endif
CFLAGS = $( CXXFLAGS)
e n d i f