--- cdw/src/Makefile.am.jj 2009-09-28 10:42:57.666568950 +0800 +++ cdw/src/Makefile.am.jj 2009-09-28 10:43:03.532348663 +0800 @@ -35,7 +35,7 @@ -Wstrict-prototypes # AM_CFLAGS = -pedantic -Wall -Wextra -Wformat-security -Wswitch-default -Wshadow -Wno-declaration-after-statement -Wno-long-long -AM_LDFLAGS = -lmenuw -lformw -lpanelw -lncursesw -lpthread -lcdio +AM_LDFLAGS = -as-needed -lmenuw -lformw -lpanelw -lncursesw -lpthread -lcdio -lm # this lists the binaries to produce