[BACK]Return to bsd.lib.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.lib.mk between version 1.122 and 1.123

version 1.122, 1997/12/24 05:15:54 version 1.123, 1998/02/18 03:14:31
Line 36  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
Line 36  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
 # SHLIB_SOVERSION:      version number to be compiled into a shared library  # SHLIB_SOVERSION:      version number to be compiled into a shared library
 #                       via -soname. Usualy ${SHLIB_MAJOR} on ELF.  #                       via -soname. Usualy ${SHLIB_MAJOR} on ELF.
 #                       NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}.  #                       NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}.
 # SHLIB_LDSTARTFILE:    ???  # SHLIB_SHFLAGS:        Flags to tell ${LD} to emit  shared library.
 # SHLIB_LDENDTILE:      ??  #                       with ELF, also set shared-lib version for ld.so.
   # SHLIB_LDSTARTFILE:    support .o file, call C++ file-level constructors
   # SHLIB_LDENDFILE:      support .o file, call C++ file-level destructors
   # SHLIB_WHOLE:          turn on whole-archive
   # SHLIB_NOWHOLE:        turn off whole-archive
 # CPPICFLAGS:   flags for ${CPP} to preprocess  .[sS]  files for ${AS}  # CPPICFLAGS:   flags for ${CPP} to preprocess  .[sS]  files for ${AS}
 # CPICFLAGS:    flags for ${CC} to compile  .[cC] files to .so objects.  # CPICFLAGS:    flags for ${CC} to compile  .[cC] files to .so objects.
 # CAPICFLAGS    flags for {$CC} to compiling .[Ss] files  # CAPICFLAGS    flags for {$CC} to compiling .[Ss] files
Line 45  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
Line 49  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
 # APICFLAGS:    flags for ${AS} to assemble .[sS]  to .so objects.  # APICFLAGS:    flags for ${AS} to assemble .[sS]  to .so objects.
   
 .if (${MACHINE_ARCH} == "alpha")  .if (${MACHINE_ARCH} == "alpha")
                   # Alpha-specific shared library flags
 SHLIB_TYPE=ELF  SHLIB_TYPE=ELF
 SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o  SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o
 SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o  SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o
 SHLIB_SOVERSION=${SHLIB_MAJOR}  
 CPICFLAGS ?= -fpic -DPIC  CPICFLAGS ?= -fpic -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
 APICFLAGS ?=  APICFLAGS ?=
   
 .elif (${MACHINE_ARCH} == "mips")  .elif (${MACHINE_ARCH} == "mips")
                   # mips-specific shared library flags
 SHLIB_TYPE=ELF  SHLIB_TYPE=ELF
 # still use gnu-derived ld.so on pmax; don't have or need lib<>.so support.  # Still use gnu-derived ld.so on pmax; don't have or need lib<>.so support.
 SHLIB_LDSTARTFILE=  SHLIB_LDSTARTFILE=
 SHLIB_LDENDFILE=  SHLIB_LDENDFILE=
 SHLIB_SOVERSION=${SHLIB_MAJOR}  
   
 # On mips, all libs need to be compiled with ABIcalls, not just sharedlibs.  # On mips, all libs need to be compiled with ABIcalls, not just sharedlibs.
 CPICFLAGS?=  CPICFLAGS?=
Line 77  AS+= -KPIC
Line 79  AS+= -KPIC
   
 .else  .else
   
   # Platform-independent flags for NetBSD a.out shared libraries
 SHLIB_TYPE=a.out  SHLIB_TYPE=a.out
 SHLIB_LDSTARTFILE=  SHLIB_LDSTARTFILE=
 SHLIB_LDENDFILE=  SHLIB_LDENDFILE=
   SHLIB_SHFLAGS= -Bshareable -Bforcearchive
 SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}  SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
   SHLIB_WHOLE=
   SHLIB_NOWHOLE=
 CPICFLAGS?= -fpic -DPIC  CPICFLAGS?= -fpic -DPIC
 CPPPICFLAGS?= -DPIC  CPPPICFLAGS?= -DPIC
 CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}  CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
Line 88  APICFLAGS?= -k
Line 94  APICFLAGS?= -k
   
 .endif  .endif
   
   # Platform-independent linker flags for ELF shared libraries
   .if (${SHLIB_TYPE} == "ELF")
   SHILB_WHOLE=--whole-archive
   SHILB_NOWHOLE=--no-whole-archive
   SHLIB_SOVERSION=${SHLIB_MAJOR}
   SHLIB_SHFLAGS=-shared -soname lib${LIB}.so.${SHLIB_SOVERSION}
   .endif
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   
Line 216  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
Line 229  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}      ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
         @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)          @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
         @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}          @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
 .if (${SHLIB_TYPE} == "a.out")          $(LD) -x ${SHLIB_SHFLAGS} -o ${.TARGET} \
         $(LD) -x -Bshareable -Bforcearchive \              ${SHLIB_LDSTARTFILE} \
             -o ${.TARGET} lib${LIB}_pic.a ${LDADD}              ${SHLIB_WHOLE} lib${LIB}_pic.a ${SHLIB_NOWHOLE} ${LDADD} \
 .elif (${SHLIB_TYPE} == "ELF")  
         $(LD) -x -shared -o ${.TARGET} \  
             -soname lib${LIB}.so.${SHLIB_SOVERSION}  ${SHLIB_LDSTARTFILE} \  
             --whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \  
             ${SHLIB_LDENDFILE}              ${SHLIB_LDENDFILE}
 .endif  
   
 LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 LLIBS?=         -lc  LLIBS?=         -lc

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.123

CVSweb <webmaster@jp.NetBSD.org>