- Timestamp:
- Mar 31, 2015, 5:56:39 PM (11 years ago)
- Location:
- branches/swt
- Files:
-
- 1 deleted
- 3 edited
-
Config.kmk (modified) (2 diffs)
-
LocalConfig.kmk.tpl (modified) (2 diffs)
-
include/dbgcon.h (deleted)
-
include/dbglog.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/swt/Config.kmk
r22086 r22092 338 338 ifneq ($(PATH_SDK_OS2TK4),) 339 339 # 340 # We can't add Toolkit includes in _INCS (it will ca suse thento be searched340 # We can't add Toolkit includes in _INCS (it will cause them to be searched 341 341 # before GCC headers and lead to conflicts), so use -idirafter. 342 342 # … … 344 344 TEMPLATE_OdinCxx_CXXFLAGS += -idirafter $(PATH_SDK_OS2TK4)/h 345 345 endif 346 347 # 348 # If DBG_CON is defined, jam it in to globally enable simple console logging. 349 # If not, then per source console logging can be enabled by defining DBG_CON 350 # _before_ the inclusion of the <misc.h> header. 351 # 352 ifneq ($(DBG_CON),undefined) 353 TEMPLATE_OdinCxx_CFLAGS += -DDBG_CON 354 TEMPLATE_OdinCxx_CXXFLAGS += -DDBG_CON 355 endif -
branches/swt/LocalConfig.kmk.tpl
r21916 r22092 8 8 # NOTES: 9 9 # 10 # This file is a template! Copy it to a file named LocalConfig.kmk in 10 # This file is a template! Copy it to a file named LocalConfig.kmk in 11 11 # the same directory and modify the copy to fit your local environment. 12 12 # … … 33 33 # 34 34 # PATH_TOOL_ALP := alp.exe 35 36 # 37 # Globally enable simple console logging. 38 # Per source console logging can be enabled by defining DBG_CON _before_ 39 # the inclusion of the <misc.h> header. 40 # DBG_CON= -
branches/swt/include/dbglog.h
r22041 r22092 14 14 #ifdef __cplusplus 15 15 extern "C" { 16 #endif 17 18 // To enable global console logging, use 'kmk DBG_CON=' _or_ set 'DBG_CON=' 19 // in LocalConfig.kmk _or_ set DBG_CON to some value in the environment. 20 // Per source console logging can be enabled by defining DBG_CON _before_ 21 // the inclusion of the <misc.h> header. 22 #ifdef DBG_CON 23 #define PFXFMT "**__con_debug(%d)** " 24 #define __con_debug(lvl, fmt, ...)\ 25 switch (lvl) {\ 26 case 0:\ 27 break;\ 28 case 2:\ 29 printf(PFXFMT, lvl);\ 30 printf(fmt, __VA_ARGS__);\ 31 break;\ 32 case 3:\ 33 printf(PFXFMT"FUNCTION:%s ", lvl, __FUNCTION__);\ 34 printf(fmt, __VA_ARGS__);\ 35 break;\ 36 case 4:\ 37 printf(PFXFMT"FILE:%s FUNCTION:%s ", lvl, __FILE__, __FUNCTION__);\ 38 printf(fmt, __VA_ARGS__);\ 39 break;\ 40 case 5:\ 41 printf(PFXFMT, lvl);\ 42 printf(fmt, __VA_ARGS__);\ 43 break;\ 44 default:\ 45 printf(fmt, __VA_ARGS__);\ 46 break;\ 47 }\ 48 fflush(stdout) 49 #else 50 #define __con_debug(lvl, fmt, ...) 16 51 #endif 17 52
Note:
See TracChangeset
for help on using the changeset viewer.
