From: Steinar H. Gunderson Date: Mon, 21 Jan 2013 21:04:00 +0000 (+0100) Subject: Add sdl-config --cflags and --libs when compiling. X-Git-Tag: 1.0~149^2~7 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=a1028b34cc7d1ce5e1a12ed2222a0e35f8f54bf5 Add sdl-config --cflags and --libs when compiling. --- diff --git a/Makefile b/Makefile index 83e6852..cea2234 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,20 @@ 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 + CC=gcc CXX=g++ CXXFLAGS=-Wall -g -I$(GTEST_DIR)/include $(EIGEN_CXXFLAGS) $(GLEW_CXXFLAGS) -LDFLAGS=-lSDL -lSDL_image -lGL -lrt -lpthread -lpng $(GLEW_LIBS) +LDFLAGS=-lSDL -lSDL_image -lGL -lrt -lpthread -lpng $(GLEW_LIBS) $(SDL_LIBS) RANLIB=ranlib ifeq ($(COVERAGE),1)