]> git.sesse.net Git - movit/blobdiff - Makefile
Add sdl-config --cflags and --libs when compiling.
[movit] / Makefile
index 306a730adef46fed79efae373d4640dac13506e1..cea223443588a324ef701b8d601dace68250d3af 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-GTEST_DIR = /usr/src/gtest
+GTEST_DIR ?= /usr/src/gtest
 
 EIGEN_CXXFLAGS := $(shell pkg-config --cflags eigen3)
 ifeq ($(EIGEN_CXXFLAGS),)
@@ -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 $(GLEW_LIBS)
+LDFLAGS=-lSDL -lSDL_image -lGL -lrt -lpthread -lpng $(GLEW_LIBS) $(SDL_LIBS)
 RANLIB=ranlib
 
 ifeq ($(COVERAGE),1)
@@ -41,6 +51,7 @@ TESTS += saturation_effect_test
 TESTS += deconvolution_sharpen_effect_test
 TESTS += blur_effect_test
 TESTS += unsharp_mask_effect_test
+TESTS += glow_effect_test
 TESTS += diffusion_effect_test
 TESTS += white_balance_effect_test
 TESTS += lift_gamma_gain_effect_test