Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / usb / shellapps / debug.h
blobb87d93ccbb7a70e4683114567cdd796bc5919877
1 #ifndef __DEBUG_H__
2 #define __DEBUG_H__
4 #define DB_LEVEL 1
6 //#define DEBUG 1
8 #ifdef AROS_USB30_CODE
9 #undef DEBUG
10 #undef DB_LEVEL
11 #define DEBUG 1
12 #define DB_LEVEL 1000
13 #endif
15 #include <proto/debug.h>
17 // DEBUG 0 should equal undefined DEBUG
18 #ifdef DEBUG
19 #if DEBUG == 0
20 #undef DEBUG
21 #endif
22 #endif
24 #ifdef DEBUG
25 #define KPRINTF(l, x) do { if ((l) >= DB_LEVEL) \
26 { KPrintF("%s:%s/%lu: ", __FILE__, __FUNCTION__, __LINE__); KPrintF x;} } while (0)
27 #define DB(x) x
28 void dumpmem_shellapps(void *mem, unsigned long int len);
29 #else /* !DEBUG */
31 #define KPRINTF(l, x) ((void) 0)
32 #define DB(x)
34 #endif /* DEBUG */
36 #endif /* __DEBUG_H__ */