Subject: How to build shared libs?

From: [email-masked]

Hi,
I just wonder how i can build shared libs with ar. I would like to 
build a shared tiff,tk,tcl, etc. library. Where can I get a manpage 
explaining that and where can i get a ar doing it?
Is there something bad in changing the -O in /usr/share/mk/sys.mk to -O2
-m68030 -m68881 ?
ciao
Carsten
--
Carsten Hammer  Schwindstr. 7 33615 Bielefeld
Fakultaet fuer Physik          D4-139
[email-masked]

---

From: [email-masked] (Chris Hopps)

> Is there something bad in changing the -O in /usr/share/mk/sys.mk to -O2

I don't know about the 68030 thats untested.  I compile with -O2
though.  As far as shared libs go, have you looked at the berkely make
system?  It makes things fairly simple.  If your /usr/share/mk files
are up to date you should be able to construct a file as so (see
below) and it will build static, static profiled and shared versions
of "mylib".

---
LIB=	mylib
SRCS=a.c b.c c.c d.c e.c

.include <bsd.lib.mk>
---

> Carsten

Chris.

---

From: [email-masked]

> explaining that and where can i get a ar doing it?

It's not ar, it's ld that creates shared libraries. Check out 
/usr/share/mk/bsd.lib.mk if you'd like to see how the system libraries
are built.

> Is there something bad in changing the -O in /usr/share/mk/sys.mk to -O2

Hm.. slightly dangerous to make this the default, as -O2 will imply
-fomit-frame-pointer, which is a somewhat tricky option to have
enabled all the time... -m68881 is already the default, and I'd not
advise using -mc68030, as it won't give you any additional bonus over
the default of -mc68020, but it just might cause gcc to pass the wrong
flags to the assembler...

-Markus
-- 
CHUUG/EUnet Switzerland				Markus Wild
Zweierstrasse 35	Tel: +41 1 291 45 80	[email-masked]
CH-8004 Zuerich		Fax: +41 1 291 46 42	S=mw;P=EUnet;A=EUnet;C=CH