diff --git a/utils/api_demos/Makefile b/utils/api_demos/Makefile
index 78b237b59799455e561ff5f81b18e21923a82896..c6fc6009f74786834973cca2270daa1f9aebdcab 100644
--- a/utils/api_demos/Makefile
+++ b/utils/api_demos/Makefile
@@ -1,4 +1,4 @@
-FLAGS = -g -O2
+FLAGS = -g -O2 ${CXXFLAGS}
 INC = -I/usr/local/include -I.
 GMSH = -L/usr/local/lib -lGmsh
 GLUT = -framework OpenGL -framework GLUT -framework Cocoa -framework ApplicationServices