#INCLUDES = -I../debug -D__MEMORY_ALLOCATION__
INCLUDES += -DVERBOSE_COLOR=1
+#INCLUDES += -DVERBOSE_LOCATION=1
OFLAGS = -O4 -Os
#OFLAGS = -O0
#OFLAGS = -O4 -ffast-math -finline-functions
#ifndef VERBOSE_COLOR
#define VERBOSE_COLOR 0
#endif
+#ifndef VERBOSE_LOCATION
+#define VERBOSE_LOCATION 0
+#endif
/**
Debug level
@param format format string
@param ... optionnal arguments
*/
-#define PRINTF(format...) \
- do { \
- printf ("%s+%d[%s]: ", __FILE__, __LINE__, _level); \
- printf (format); \
- fflush (stdout); \
+#define PRINTF(format...) \
+ do { \
+ if (VERBOSE_LOCATION) printf ("%s+%d ", __FILE__, __LINE__); \
+ printf ("[%s] ", _level); \
+ printf (format); \
+ fflush (stdout); \
} while (0)
@param format format string
@param ... optionnal arguments
*/
-#define FPRINTF(stream, format...) \
- do { \
- fprintf (stream,"%s+%d[%s]: ", __FILE__, __LINE__, _level); \
- fprintf (stream, format); \
- fflush (stream); \
+#define FPRINTF(stream, format...) \
+ do { \
+ if (VERBOSE_LOCATION) fprintf (stream, "%s+%d ", __FILE__, __LINE__); \
+ fprintf (stream, "[%s] ", _level); \
+ fprintf (stream, format); \
+ fflush (stream); \
} while (0)
__END_DECLS