Index: cwiid-0.6.00+svn201/wmgui/Makefile.in
===================================================================
--- cwiid-0.6.00+svn201.orig/wmgui/Makefile.in	2011-04-23 17:04:36.000000000 -0500
+++ cwiid-0.6.00+svn201/wmgui/Makefile.in	2011-04-23 17:05:05.000000000 -0500
@@ -8,7 +8,7 @@
 
 CFLAGS += @GTK_CFLAGS@ -I@top_builddir@/libcwiid
 LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += @GTK_LIBS@ -lm -lcwiid
+LDLIBS += -Wl,--as-needed @GTK_LIBS@ -lm -lbluetooth -lcwiid
 INST_DIR = @bindir@
 
 include $(COMMON)/include/app.mak
Index: cwiid-0.6.00+svn201/lswm/Makefile.in
===================================================================
--- cwiid-0.6.00+svn201.orig/lswm/Makefile.in	2011-04-23 17:04:36.000000000 -0500
+++ cwiid-0.6.00+svn201/lswm/Makefile.in	2011-04-23 17:05:05.000000000 -0500
@@ -8,7 +8,7 @@
 
 CFLAGS += -I@top_builddir@/libcwiid
 LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += -lcwiid
+LDLIBS += -lbluetooth -lcwiid
 INST_DIR = @bindir@
 
 include $(COMMON)/include/app.mak
Index: cwiid-0.6.00+svn201/wmdemo/Makefile.in
===================================================================
--- cwiid-0.6.00+svn201.orig/wmdemo/Makefile.in	2011-04-23 17:04:36.000000000 -0500
+++ cwiid-0.6.00+svn201/wmdemo/Makefile.in	2011-04-23 17:05:05.000000000 -0500
@@ -8,7 +8,7 @@
 
 CFLAGS += -I@top_builddir@/libcwiid
 LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += -lcwiid
+LDLIBS += -lbluetooth -lcwiid
 INST_DIR = @bindir@
 
 include $(COMMON)/include/app.mak
Index: cwiid-0.6.00+svn201/wminput/Makefile.in
===================================================================
--- cwiid-0.6.00+svn201.orig/wminput/Makefile.in	2011-04-23 17:04:36.000000000 -0500
+++ cwiid-0.6.00+svn201/wminput/Makefile.in	2011-04-23 17:13:45.000000000 -0500
@@ -14,7 +14,7 @@
 	-DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \
 	-DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\"
 
-LDLIBS += -lcwiid -ldl
+LDLIBS += -lpthread -lbluetooth -lcwiid -ldl
 LDFLAGS += -L@top_builddir@/libcwiid -rdynamic
 INST_DIR = @bindir@
 
Index: cwiid-0.6.00+svn201/common/include/lib.mak.in
===================================================================
--- cwiid-0.6.00+svn201.orig/common/include/lib.mak.in	2011-04-23 17:04:36.000000000 -0500
+++ cwiid-0.6.00+svn201/common/include/lib.mak.in	2011-04-23 17:05:05.000000000 -0500
@@ -25,8 +25,8 @@
 	ar rcs $(STATIC_LIB) $(OBJECTS)
 
 $(SHARED_LIB): $(OBJECTS)
-	$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \
-	      -o $(SHARED_LIB) $(OBJECTS)
+	$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) \
+	      -o $(SHARED_LIB) $(OBJECTS) $(LDLIBS)
 
 install: install_header install_static install_shared
 
