Re: static

"Kellogg, Oliver" <[email protected]> Wed, 31 Mar 2010 14:34:22 +0200
Newsgroups gmane.comp.lang.ada.sockets
Message-ID <[email protected]>
On 2007-12-08 13:34:23 GMT, Samuel Tardieu <[email protected]> wrote:
> 
> On  8/12, Thomas De Contes wrote:
> 
> > It seems that with adasockets-config it uses automatically the
shared 
> > version
> 
> It has nothing to do with AdaSockets or adasockets-config; just add
> "-static" before the call to "adasockets-config --libs" on your
gnatmake
> command line.
> 
> But why would you want to do that?

For example, we wish to link only the adasockets lib statically but
other libs dynamically.
I use the following workaround in my Makefile:

# adasockets-config does not return the flags as we want them:
# For --cflags, we want -A not -I (to avoid recompilations)
# For --lflags, we want the static library not the dynamic library
ADASOCKETS_ROOT = $(shell type -p adasockets-config | sed
's@/bin/adasockets-config@@')
ADASOCKETS_CFLAGS := -A$(ADASOCKETS_ROOT)/lib/adasockets $(INCLUDES)
ADASOCKETS_LFLAGS := $(ADASOCKETS_ROOT)/lib/libadasockets.a


HTH,

Oliver


--
Oliver M. Kellogg
EADS Deutschland GmbH
Defence and Communication Systems
Dept. ISEG42
D-89077 Ulm, Germany
Tel: +49 (0) 731.392-7138
Fax: +49 (0) 731.392-xxxx
E-Fax: +49 (0) 731.392-20 7138
E-Mail: [email protected]

EADS Deutschland GmbH
Registered Office: Ottobrunn
District Court of Munich HRB107648
Chairman of the Supervisory Board: Dr. Thomas Enders
Managing Directors: Dr. Stefan Zoller (chairman), Michael Hecht
_______________________________________________
AdaSockets mailing list
[email protected]
http://lists.rfc1149.net/mailman/listinfo/adasockets