[Olsr-dev] Cleanup of olsrd makefile.inc

Henning Rogge (spam-protected)
Tue Apr 14 07:59:14 CEST 2009


Hello,

I just did some cleanup on the olsrd development makefile.inc and the 
praeprocessor code in olsr.org.

In the past we had a chaos of multiple debugging related praeprocessor defines 
like DEBUG, NO_DEBUG, NDEBUG, NO_DEBUG_MESSAGES and another one I don't 
remember. Then we got the new logging API which allowed for four additional 
defines to control the amount of logging compiled into the olsr.org.

I removed all of them except DEBUG and the new logging defines, so the result 
is:

DEBUG
- if set to 1 the code is compiled with debug information for gdb (-ggdb, -O0)
- if set to 0 the code is optimized for space (-Os)

REMOVE_LOG_DEBUG
REMOVE_LOG_INFO
REMOVE_LOG_WARN
REMOVE_LOG_ERROR
- if set to 1 the code for the severity level is not COMPILED into olsr.org
(you don't need to display a severity level of logging compiled into the code, 
but you cannot display one NOT compiled into it ;) ).

The results (binary size of olsrd) on my test machine are:
(Debian testing, olsrd-tip: gcc version 4.3.3 (Debian 4.3.3-3) )

DEBUG, all logging                                 640 kb
no debug, all logging                              154 kb
no debug, only warn/error                          131 kb
no debug, no logging                               121 kb


On the same machine I got olsrd-0.5.6 down to

no DEBUG, NO_DEBUG_MESSAGES, OPTIMIZE = -Os        180 kb

Henning Rogge

*************************************************
Diplom-Informatiker Henning Rogge
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN) 
Neuenahrer Str. 20, 53343 Wachtberg, Germany
Tel.: 0049 (0)228 9435-961
Fax: 0049 (0)228 9435-685
E-Mail: (spam-protected)
Web: www.fgan.de
************************************************
Sitz der Gesellschaft: Bonn
Registergericht: Amtsgericht Bonn VR 2530
Vorstand: Prof. Dr. rer. nat. Maurus Tacke (komm. Vors.), Prof. Dr.-Ing. 
Joachim Ender (Stellv.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20090414/8a001797/attachment.sig>


More information about the Olsr-dev mailing list