feat(build): 引入新的 Python 构建系统并移除旧 Makefile
新增基于 Python 的构建脚本 `cbuild.py`,支持包管理、依赖解析和模块化编译。 同时添加 `.gitignore` 忽略 `build` 目录,并在 `justfile` 中更新构建命令。 移除了原有的 `lib/Makefile` 和主目录下的相关 make 规则,统一使用新构建系统。
This commit is contained in:
48
libs/lexer/include/lexer_log.h
Normal file
48
libs/lexer/include/lexer_log.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#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__
|
||||
Reference in New Issue
Block a user