Add debug.h and clean Makefile
[xylftp.git] / server / src / debug.h
blobe9d1e11bbd16242d6efc24ab51aa7356a4a9b12b
1 #ifndef DEBUG_H
2 #define DEBUG_H
4 #include <stdio.h>
6 #ifdef DEBUG
8 #define debug_printf(fmt, ...) \
9 printf("DEBUG: %s:%d@%s: " fmt,\
10 __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)
12 #else /* !DEBUG */
14 #define debug_printf(fmt, ...) do{} while(0)
16 #endif /* DEBUG */
18 #endif /* DEBUG_H */