From 5708bf48680794547c526a4bf56a9816e3dcbae6 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 9 Dec 2013 07:26:55 +0000 Subject: [PATCH] Make it easier to test build the USB code having the debug flags set without having to build the complete kernel. MFC after: 2 weeks --- sys/modules/usb/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile index caf4ebbeaab..24847cacd50 100644 --- a/sys/modules/usb/Makefile +++ b/sys/modules/usb/Makefile @@ -27,6 +27,18 @@ .include +# +# Check for common USB debug flags to pass when building the USB +# modules in this directory: +# +.if defined(USB_DEBUG) +MAKE+=" DEBUG_FLAGS+=-DUSB_DEBUG" +.endif + +.if defined(USB_DEBUG) && defined(USB_REQ_DEBUG) +MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" +.endif + # Modules that include binary-only blobs of microcode should be selectable by # MK_SOURCELESS_UCODE option (see below).