From: Steinar H. Gunderson Date: Mon, 26 Nov 2012 23:41:35 +0000 (+0100) Subject: Only run the pkg-config line for Eigen3 once. X-Git-Tag: 1.0~198 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=9cae3a759486e8dd608b5ff3c119b3a98f86ac6c Only run the pkg-config line for Eigen3 once. Also, print an error message if pkg-config has failed. --- diff --git a/Makefile b/Makefile index f7ba81e..1ab3d9c 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ GTEST_DIR = /usr/src/gtest +EIGEN_CXXFLAGS := $(shell pkg-config --cflags eigen3) +ifeq ($(EIGEN_CXXFLAGS),) +$(error Empty EIGEN_CXXFLAGS. You probably need to install Eigen3) +endif + CC=gcc CXX=g++ -CXXFLAGS=-Wall -g -I$(GTEST_DIR)/include $(shell pkg-config --cflags eigen3 ) +CXXFLAGS=-Wall -g -I$(GTEST_DIR)/include $(EIGEN_CXXFLAGS) LDFLAGS=-lSDL -lSDL_image -lGL -lrt -lpthread RANLIB=ranlib