]> git.sesse.net Git - movit/commitdiff
Do not link libmovit against SDL; only the unit tests need that.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Mar 2014 22:01:29 +0000 (23:01 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Mar 2014 22:01:29 +0000 (23:01 +0100)
Makefile.in

index 3f8f0dc79123815b5588fa9881a1a7713f511191..5d0cb8ad3a98e3927f9c8e8b5768ab43f6f2267a 100644 (file)
@@ -22,7 +22,8 @@ with_coverage = @with_coverage@
 CC=@CC@
 CXX=@CXX@
 CXXFLAGS=-Wall @CXXFLAGS@ -I$(GTEST_DIR)/include @Eigen3_CFLAGS@ @GLEW_CFLAGS@ @FFTW3_CFLAGS@
-LDFLAGS=@GLEW_LIBS@ @SDL_LIBS@ @FFTW3_LIBS@ -lpthread
+LDFLAGS=@GLEW_LIBS@ @FFTW3_LIBS@ -lpthread
+TEST_LDLIBS=@SDL_LIBS@
 DEMO_LDLIBS=@SDL_image_LIBS@ -lrt -lpthread @libpng_LIBS@ @FFTW3_LIBS@
 SHELL=@SHELL@
 LIBTOOL=@LIBTOOL@ --tag=CXX
@@ -101,7 +102,7 @@ gtest_sdl_main.o: gtest_sdl_main.cpp
 
 # Unit tests.
 $(TESTS): %: %.o $(TEST_OBJS) libmovit.la
-       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+       $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(TEST_LDLIBS)
 
 OWN_OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(OWN_TEST_OBJS) $(TESTS:=.o)
 OBJS=$(DEMO_OBJS) $(LIB_OBJS) $(TEST_OBJS) $(TESTS:=.o)