From c208d2719d48f7676d73b6f406f2417ec147acae Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 2 Feb 2013 14:44:26 +0100 Subject: [PATCH] Stop linking unit tests et al against SDL_image and other things that only the demo program needs. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0d36c7e..02d1980 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,8 @@ 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) $(SDL_LIBS) +LDFLAGS=$(GLEW_LIBS) $(SDL_LIBS) +DEMO_LDFLAGS=-lSDL_image -lrt -lpthread -lpng RANLIB=ranlib ifeq ($(COVERAGE),1) @@ -111,7 +112,7 @@ OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(TEST_OBJS) $(TESTS:=.o) # A small demo program. demo: libmovit.a $(DEMO_OBJS) - $(CXX) -o demo $(DEMO_OBJS) libmovit.a $(LDFLAGS) + $(CXX) -o demo $(DEMO_OBJS) libmovit.a $(LDFLAGS) $(DEMO_LDFLAGS) # The library itself. libmovit.a: $(LIB_OBJS) -- 2.39.2