@ -2,10 +2,15 @@
# Cross Platform Makefile
# Compatible with MSYS2/MINGW, Ubuntu 14.04.1 and Mac OS X
#
# Important: This is a "null back-end" application, with no visible output or interaction!
# This is used for testing purpose and continuous integration, and has little use for end-user.
#
EXE = example_null
EXTRA_WARNINGS ?= 0
# Options
WITH_ EXTRA_WARNINGS ?= 0
WITH_FREETYPE ?= 0
EXE = example_null
SOURCES = main.cpp
SOURCES += ../../imgui.cpp ../../imgui_demo.cpp ../../imgui_draw.cpp ../../imgui_widgets.cpp
OBJS = $( addsuffix .o, $( basename $( notdir $( SOURCES) ) ) )
@ -15,12 +20,13 @@ 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 )
# We use the WITH_ EXTRA_WARNINGS flag on our CI setup to eagerly catch zealous warnings
i f e q ( $( WITH_ EXTRA_WARNINGS) , 1 )
CXXFLAGS += -Wno-zero-as-null-pointer-constant -Wno-double-promotion -Wno-variadic-macros
e n d i f
# We use the WITH_FREETYPE flag on our CI setup to test misc/freetype/imgui_freetype.cpp font rasterizer
# We use the WITH_FREETYPE flag on our CI setup to test compiling misc/freetype/imgui_freetype.cpp
# (only supported on Linux, and note that the imgui_freetype code currently won't be executed)
i f e q ( $( WITH_FREETYPE ) , 1 )
SOURCES += ../../misc/freetype/imgui_freetype.cpp
CXXFLAGS += $( shell pkg-config --cflags freetype2)
@ -33,7 +39,7 @@ endif
i f e q ( $( UNAME_S ) , L i n u x ) #LINUX
ECHO_MESSAGE = "Linux"
ifneq ( $( EXTRA_WARNINGS) , 0)
ifneq ( $( WITH_ EXTRA_WARNINGS) , 0)
CXXFLAGS += -Wextra -pedantic
endif
CFLAGS = $( CXXFLAGS)
@ -41,7 +47,7 @@ endif
i f e q ( $( UNAME_S ) , D a r w i n ) #APPLE
ECHO_MESSAGE = "Mac OS X"
ifneq ( $( EXTRA_WARNINGS) , 0)
ifneq ( $( WITH_ EXTRA_WARNINGS) , 0)
CXXFLAGS += -Weverything -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-padded -Wno-c++11-long-long
endif
CFLAGS = $( CXXFLAGS)
@ -49,7 +55,7 @@ endif
i f e q ( $( findstring MINGW ,$ ( UNAME_S ) ) , M I N G W )
ECHO_MESSAGE = "MinGW"
ifneq ( $( EXTRA_WARNINGS) , 0)
ifneq ( $( WITH_ EXTRA_WARNINGS) , 0)
CXXFLAGS += -Wextra -pedantic
endif
CFLAGS = $( CXXFLAGS)