新增基于 Python 的构建脚本 `cbuild.py`,支持包管理、依赖解析和模块化编译。 同时添加 `.gitignore` 忽略 `build` 目录,并在 `justfile` 中更新构建命令。 移除了原有的 `lib/Makefile` 和主目录下的相关 make 规则,统一使用新构建系统。
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
#ifndef __SMCC_LEXER_LOG_H__
|
|
#define __SMCC_LEXER_LOG_H__
|
|
|
|
#include <libcore.h>
|
|
|
|
#ifndef LEX_LOG_LEVEL
|
|
#define LEX_LOG_LEVEL 4
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 1
|
|
#define LEX_NOTSET( fmt, ...) MLOG_NOTSET(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_NOTSET( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 2
|
|
#define LEX_DEBUG( fmt, ...) MLOG_DEBUG(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_DEBUG( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 3
|
|
#define LEX_INFO( fmt, ...) MLOG_INFO(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_INFO( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 4
|
|
#define LEX_WARN( fmt, ...) MLOG_WARN(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_WARN( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 5
|
|
#define LEX_ERROR( fmt, ...) MLOG_ERROR(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_ERROR( fmt, ...)
|
|
#endif
|
|
|
|
#if LEX_LOG_LEVEL <= 6
|
|
#define LEX_FATAL( fmt, ...) MLOG_FATAL(&__smcc_lexer_log, fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define LEX_FATAL( fmt, ...)
|
|
#endif
|
|
|
|
extern logger_t __smcc_lexer_log;
|
|
|
|
#endif // __SMCC_LEXER_LOG_H__
|