<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.0">
</HEAD>
<BODY>
any idea?<BR>
<BR>
On ven, 2008-03-14 at 14:43 +0100, Luigi 'Comio' Mantellini wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi All,
Is there a symbol (like __U_BOO_T__) that is defined during U-Boot
compilation and that I can test into my .c/.h source files?
I have a self-made library that is shared between the bootloader and the
linux kernel.
Obviously the source paths and includes are different in the two
environment and I need to choose the correct code on the basis of the
target enviroment.
In the linux kernel I can use symbol like "__LINUX__" to understand that
the actual compilation is referred to the Linux Kernel... but I don't
find an similar symbol define in U-Boot.
I would write code like:
...
#if defined(__U_BOOT__)
/* U-boot specific code */
...
#elsif defined(__LINUX__)
/*Kernel specific code */
#endif
...
Is there a similar mechanism in U-BOOT building infrastructure? (anyway,
can we insert a -D__U_BOOT__ in the compiler invocation?)
Thanks a lot,
luigi
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<TABLE CELLSPACING="14">
<TR>
<TD>
<A HREF="http://www.idf-hit.com"><IMG SRC="cid:1206358715.7608.0.camel@localhost" ALIGN="bottom" ALT="Industrie Dial Face S.p.A." BORDER="0"></A>
</TD>
<TD>
<B>Luigi Mantellini</B><BR>
R&D - Software<BR>
<TT>Industrie Dial Face S.p.A.</TT><BR>
<TT>Via Canzo, 4 </TT><BR>
<TT>20068 Peschiera Borromeo (MI), Italy</TT><BR>
<TT>Tel.: +39 02 5167 2813</TT><BR>
<TT>Fax: +39 02 5167 2459</TT><BR>
<TT>E-mail: <A HREF="mailto:luigi.mantellini@idf-hit.com">luigi.mantellini@idf-hit.com</A></TT><BR>
<TT>GPG fingerprint: 3DD1 7B71 FBDF 6376 1B4A</TT><BR>
<TT> B003 175F E979 907E 1650</TT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>