diff -pruN 0.8.13a-1/debian/changelog 0.8.13a-1ubuntu1/debian/changelog
--- 0.8.13a-1/debian/changelog	2010-12-03 23:09:49.000000000 +0000
+++ 0.8.13a-1ubuntu1/debian/changelog	2010-12-03 23:01:15.000000000 +0000
@@ -1,3 +1,9 @@
+gramophone2 (0.8.13a-1ubuntu1) natty; urgency=low
+
+  * Makefile: Fix linking with --as-needed. 
+
+ -- Michael Bienia <geser@ubuntu.com>  Fri, 03 Dec 2010 17:37:23 +0100
+
 gramophone2 (0.8.13a-1) unstable; urgency=low
 
   * New upstream release
diff -pruN 0.8.13a-1/debian/control 0.8.13a-1ubuntu1/debian/control
--- 0.8.13a-1/debian/control	2010-12-03 23:09:49.000000000 +0000
+++ 0.8.13a-1ubuntu1/debian/control	2010-12-03 23:01:15.000000000 +0000
@@ -1,7 +1,8 @@
 Source: gramophone2
 Section: sound
 Priority: optional
-Maintainer: Francesco Namuri <francesco@namuri.it>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Francesco Namuri <francesco@namuri.it>
 Build-Depends: debhelper (>= 5), cdbs, bison, flex
 Standards-Version: 3.8.0
 Homepage: http://gramophone2.sourceforge.net/
diff -pruN 0.8.13a-1/Makefile 0.8.13a-1ubuntu1/Makefile
--- 0.8.13a-1/Makefile	2008-02-23 06:38:40.000000000 +0000
+++ 0.8.13a-1ubuntu1/Makefile	2010-12-03 23:01:15.000000000 +0000
@@ -1,7 +1,7 @@
 CC=gcc
-#CFLAGS+=-O2
+CFLAGS+=-O2
 #Decomment this line if you use Linux:
-CFLAGS+=-O2 -lm
+LIBS=-lm
 
 DESTDIR=/usr/local
 
@@ -9,7 +9,7 @@ default:		GRAMophone.tab.c
 			$(CC) $(CFLAGS) -o gramophone2 GRAMophone.c\
 			grammyVM.c init.c midicode.c\
 			midifile.c expcode.c debug.c errors.c\
-			hash.c GRAMophone.tab.c
+			hash.c GRAMophone.tab.c $(LIBS)
 
 GRAMophone.tab.c:	lex.yy.c
 			bison -d GRAMophone.y

