Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!BRL.ARPA!mike From: mike@BRL.ARPA.UUCP Newsgroups: comp.sys.sgi Subject: Re: Programming question Message-ID: <8711210340.aa03573@SEM.BRL.ARPA> Date: Sat, 21-Nov-87 03:40:14 EST Article-I.D.: SEM.8711210340.aa03573 Posted: Sat Nov 21 03:40:14 1987 Date-Received: Mon, 23-Nov-87 00:13:21 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 58 In the case of the BRL CAD Package, we make a privage copy of /usr/lib/libdbm.a and /usr/lib/libgl2.a, delete select.o, then add libbsd.a. This, and other vendor-specific brain-damage, means that the MAKE rule for libfb.a (our device-independent framebuffer library) look like this: # On the Silicon Graphics (and in the future perhaps others), # include the vendor's library within our own, so that linking # with libfb.a is sufficient to make pictures. # ${PRODUCTS}: $(OBJS) -if test x${SYSVERS} = xSGI34 ; then \ rm -fr tmp; mkdir tmp; rm -f ${PRODUCTS}; cd tmp; \ ${AR} x /usr/lib/libsocket.a; \ ${AR} uv ../${PRODUCTS} *; \ rm -f *; \ ${AR} x /usr/lib/libgl2.a; \ ${AR} uv ../${PRODUCTS} *; \ cd ..; rm -fr tmp; \ fi -if test x${SYSVERS} = xSGI35 ; then \ rm -fr tmp; mkdir tmp; rm -f ${PRODUCTS}; cd tmp; \ ${AR} x /usr/lib/libdbm.a; \ ${AR} x /usr/lib/libgl2.a; \ rm -f select.o; \ ${AR} x /usr/lib/libbsd.a; \ ${AR} uv ../${PRODUCTS} *; \ cd ..; rm -fr tmp ; \ fi -if test x${SYSVERS} = xUNICOS20 ; then \ cp /usr/lib/libnet.${ARCH_SUF} ${PRODUCTS}; \ fi -if test x${SYSVERS} = xSUN3 ; then \ rm -fr tmp; mkdir tmp; rm -f ${PRODUCTS}; cd tmp; \ ${AR} x /usr/lib/libsuntool.a; \ ${AR} x /usr/lib/libsunwindow.a; \ ${AR} x /usr/lib/libpixrect.a; \ ${AR} uv ../${PRODUCTS} *; \ cd ..; rm -fr tmp; \ fi ${AR} uv ${PRODUCTS} ${OBJS} ${RANLIB} ${PRODUCTS} Also, note that I consider a vendor providing a library with "unqualified" named as hopelessly naive. What body of user software for doing graphics does not already have subroutines called "move", "draw", etc? I had to modify hundreds of lines of code in our CAD Package to permit linking with GL2 at all. Things should have been called gl2_select(), as a minimum. I understand that in the dim dark days of older versions of the eternally wonderful and unchanging SystemV standard, CC was unable to handle symbols that were the same in the first 8 characters. Sun scores better in this regard, typically with 4-letter prefixes, and wonderfully long and obtuse function names. Of course, ADA (boo) and C++ handle this problem in a more powerful way. Best, -Mike