mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 19:49:45 +03:00
Added PREFIX_OBJECT() function to be able to easily prepend any string
to the object name in order to generate e.g. per-file variables.
This commit is contained in:
@@ -12,7 +12,8 @@
|
|||||||
#define _H1( x, y ) x ## y
|
#define _H1( x, y ) x ## y
|
||||||
#undef _H2
|
#undef _H2
|
||||||
#define _H2( x, y ) _H1 ( x, y )
|
#define _H2( x, y ) _H1 ( x, y )
|
||||||
#define OBJECT_SYMBOL _H2 ( obj_, OBJECT )
|
#define PREFIX_OBJECT(prefix) _H2 ( prefix, OBJECT )
|
||||||
|
#define OBJECT_SYMBOL PREFIX_OBJECT(obj_)
|
||||||
#undef _STR
|
#undef _STR
|
||||||
#define _STR(s) #s
|
#define _STR(s) #s
|
||||||
#undef _XSTR
|
#undef _XSTR
|
||||||
@@ -43,7 +44,7 @@ __asm__ ( ".equ\t" OBJECT_SYMBOL_STR ", 0" );
|
|||||||
* DEBUG_LEVEL will be inserted into the object file.
|
* DEBUG_LEVEL will be inserted into the object file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define DEBUG_SYMBOL _H2 ( debug_, OBJECT )
|
#define DEBUG_SYMBOL PREFIX_OBJECT(debug_)
|
||||||
|
|
||||||
#if DEBUG_SYMBOL
|
#if DEBUG_SYMBOL
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user