All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] testusb: fix a makefile bug in tools/usb
@ 2012-05-11 11:00 Du, ChangbinX
  2012-05-11 22:10 ` gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Du, ChangbinX @ 2012-05-11 11:00 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, mina86@mina86.com, Fleming, Matt,
	balbi@ti.com, hpa@zytor.com
  Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org

For gcc, link options must behind of compiling options, else it could lead to "undefined reference ..." error since gcc cannot find specific library.

Signed-off-by: Du Changbin <changbinx.du@intel.com>
---
 tools/usb/Makefile |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/usb/Makefile b/tools/usb/Makefile index 396d6c4..acf2165 100644
--- a/tools/usb/Makefile
+++ b/tools/usb/Makefile
@@ -3,11 +3,12 @@
 CC = $(CROSS_COMPILE)gcc
 PTHREAD_LIBS = -lpthread
 WARNINGS = -Wall -Wextra
-CFLAGS = $(WARNINGS) -g $(PTHREAD_LIBS) -I../include
+CFLAGS = $(WARNINGS) -g -I../include
+LDFLAGS = $(PTHREAD_LIBS)
 
 all: testusb ffs-test
 %: %.c
-	$(CC) $(CFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
 clean:
 	$(RM) testusb ffs-test
--
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-11 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-11 11:00 [PATCH 1/3] testusb: fix a makefile bug in tools/usb Du, ChangbinX
2012-05-11 22:10 ` gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.