[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.96 and 1.105

version 1.96, 1997/05/07 08:42:19 version 1.105, 1997/05/17 02:01:08
Line 5 
Line 5 
 .include "${.CURDIR}/../Makefile.inc"  .include "${.CURDIR}/../Makefile.inc"
 .endif  .endif
   
   .include <bsd.own.mk>
   
 .MAIN:          all  .MAIN:          all
 .PHONY:         cleanlib libinstall  .PHONY:         cleanlib libinstall
   realinstall:    libinstall
 .include <bsd.own.mk>                           # for 'NOPIC' definition  clean cleandir: cleanlib
   
 .if exists(${.CURDIR}/shlib_version)  .if exists(${.CURDIR}/shlib_version)
 SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major  SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
 SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor  SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
 .endif  .endif
   
 # prefer .S to a .c, add .po, remove stuff not used in the BSD libraries.  # add additional suffixes not exported.
 # .so used for PIC object files.  .ln used for lint output files.  # .po is used for profiling object files.
 .SUFFIXES:  # .so is used for PIC object files.
 .SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .ln .m4  .SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4
   
   
 # Set PICFLAGS to cc flags for producing position-independent code,  # Set PICFLAGS to cc flags for producing position-independent code,
Line 153  _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL
Line 155  _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL
 _LIBS+=llib-l${LIB}.ln  _LIBS+=llib-l${LIB}.ln
 .endif  .endif
   
 all: ${_LIBS} _SUBDIRUSE  all: ${SRCS} ${_LIBS}
   
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}  
   
 __archivebuild: .USE  __archivebuild: .USE
         @rm -f ${.TARGET}          @rm -f ${.TARGET}
Line 168  __archiveinstall: .USE
Line 168  __archiveinstall: .USE
         ${RANLIB} -t ${.TARGET}          ${RANLIB} -t ${.TARGET}
         chmod ${LIBMODE} ${.TARGET}          chmod ${LIBMODE} ${.TARGET}
   
   DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
   CLEANFILES+=    ${DPSRCS}
   
   OBJS+=          ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
 lib${LIB}.a:: ${OBJS} __archivebuild  lib${LIB}.a:: ${OBJS} __archivebuild
         @echo building standard ${LIB} library          @echo building standard ${LIB} library
   
 POBJS+= ${OBJS:.o=.po}  POBJS+=         ${OBJS:.o=.po}
 lib${LIB}_p.a:: ${POBJS} __archivebuild  lib${LIB}_p.a:: ${POBJS} __archivebuild
         @echo building profiled ${LIB} library          @echo building profiled ${LIB} library
   
 SOBJS+= ${OBJS:.o=.so}  SOBJS+=         ${OBJS:.o=.so}
 lib${LIB}_pic.a:: ${SOBJS} __archivebuild  lib${LIB}_pic.a:: ${SOBJS} __archivebuild
         @echo building shared object ${LIB} library          @echo building shared object ${LIB} library
   
Line 193  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
Line 197  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
             ${SHLIB_LDENDFILE}              ${SHLIB_LDENDFILE}
 .endif  .endif
   
 LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 LLIBS?= -lc  LLIBS?=         -lc
 llib-l${LIB}.ln: ${LOBJS}  llib-l${LIB}.ln: ${LOBJS}
         @echo building llib-l${LIB}.ln          @echo building llib-l${LIB}.ln
         @rm -f llib-l${LIB}.ln          @rm -f llib-l${LIB}.ln
         @${LINT} -C${LIB} ${LOBJS} ${LLIBS}          @${LINT} -C${LIB} ${LOBJS} ${LLIBS}
   
 .if !target(clean)  
 cleanlib:  cleanlib:
         rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}          rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
         rm -f lib${LIB}.a ${OBJS}          rm -f lib${LIB}.a ${OBJS}
Line 208  cleanlib:
Line 211  cleanlib:
         rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS}          rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS}
         rm -f llib-l${LIB}.ln ${LOBJS}          rm -f llib-l${LIB}.ln ${LOBJS}
   
 clean: _SUBDIRUSE cleanlib  
 cleandir: _SUBDIRUSE cleanlib  
 .else  
 cleandir: _SUBDIRUSE clean  
 .endif  
   
 .if defined(SRCS)  .if defined(SRCS)
 afterdepend: .depend  afterdepend: .depend
         @(TMP=/tmp/_depend$$$$; \          @(TMP=/tmp/_depend$$$$; \
Line 222  afterdepend: .depend
Line 219  afterdepend: .depend
             mv $$TMP .depend)              mv $$TMP .depend)
 .endif  .endif
   
 .if !target(install)  .if !target(libinstall)
 .if !target(beforeinstall)  
 beforeinstall:  
 .endif  
   
 libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a  libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a  .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
Line 301  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
Line 294  ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln:
         ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
             llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}              llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}
 .endif  .endif
   
 libinstall:: linksinstall  
 realinstall: libinstall filesinstall  
   
 install: ${MANINSTALL} _SUBDIRUSE  
 ${MANINSTALL}: afterinstall  
 afterinstall: realinstall  
 realinstall: beforeinstall  
 .endif  .endif
   
 .if !defined(NOMAN)  .if !defined(NOMAN)

Legend:
Removed from v.1.96  
changed lines
  Added in v.1.105

CVSweb <webmaster@jp.NetBSD.org>