-spaceball_LDFLAGS = -export-dynamic ../../../src/lib@LIBRARY@.la
-spaceball_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS)
\ No newline at end of file
+spaceball_LDFLAGS = -export-dynamic
+spaceball_LDADD = ../../../src/lib@LIBRARY@.la $(GL_LIBS) -lm
+spaceball_CFLAGS = -I$(top_srcdir)/include $(X_CFLAGS)