+GLEW_CXXFLAGS := $(shell pkg-config --cflags glew)
+ifeq ($(GLEW_CXXFLAGS),)
+$(error Empty GLEW_CXXFLAGS. You probably need to install GLEW)
+endif
+
+GLEW_LIBS := $(shell pkg-config --libs glew)
+ifeq ($(GLEW_LIBS),)
+$(error Empty GLEW_LIBS. You probably need to install GLEW)
+endif
+
+SDL_CXXFLAGS := $(shell sdl-config --cflags)
+ifeq ($(SDL_CXXFLAGS),)
+$(error Empty SDL_CXXFLAGS. You probably need to install SDL)
+endif
+
+SDL_LIBS := $(shell sdl-config --libs)
+ifeq ($(SDL_LIBS),)
+$(error Empty SDL_LIBS. You probably need to install SDL)
+endif
+