[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.24 and 1.32

version 1.24, 1993/08/15 20:42:41 version 1.32, 1993/10/17 01:09:01
Line 8 
Line 8 
 .MAIN: all  .MAIN: all
   
 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries  # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
   # .so used for PIC object files
 .SUFFIXES:  .SUFFIXES:
 .SUFFIXES: .out .o .po .s .c .cc .C .f .y .l .0 .1 .2 .3 .4 .5 .6 .7 .8  .SUFFIXES: .out .o .po .so .s .c .cc .C .f .y .l .0 .1 .2 .3 .4 .5 .6 .7 .8
   
 .c.o:  .c.o:
         ${CC} ${CFLAGS} -c ${.IMPSRC}          ${CC} ${CFLAGS} -c ${.IMPSRC}
Line 21 
Line 22 
         @${LD} -X -r ${.TARGET}          @${LD} -X -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
   .c.so:
           ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
   
 .cc.o .C.o:  .cc.o .C.o:
         ${CXX} ${CXXFLAGS} -c ${.IMPSRC}          ${CXX} ${CXXFLAGS} -c ${.IMPSRC}
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
Line 31 
Line 35 
         @${LD} -X -r ${.TARGET}          @${LD} -X -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
   .cc.so .C.so:
           ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
   
 .s.o:  .s.o:
         ${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \          ${CPP} -E ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
             ${AS} -o ${.TARGET}              ${AS} -o ${.TARGET}
Line 43 
Line 50 
         @${LD} -X -r ${.TARGET}          @${LD} -X -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
   .s.so:
           ${CPP} -E -DPIC ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \
               ${AS} -k -o ${.TARGET}
   
 .if !defined(NOPROFILE)  .if !defined(NOPROFILE)
 _LIBS=lib${LIB}.a lib${LIB}_p.a  _LIBS=lib${LIB}.a lib${LIB}_p.a
 .else  .else
 _LIBS=lib${LIB}.a  _LIBS=lib${LIB}.a
 .endif  .endif
   
   .if !defined(NOPIC)
   _LIBS+=lib${LIB}_pic.a
   .endif
   
   .if !defined(PICFLAG)
   PICFLAG=-fpic
   .endif
   
 all: ${_LIBS} # llib-l${LIB}.ln  all: ${_LIBS} # llib-l${LIB}.ln
   
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}  OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
Line 66  lib${LIB}_p.a:: ${POBJS}
Line 85  lib${LIB}_p.a:: ${POBJS}
         @${AR} cTq lib${LIB}_p.a `lorder ${POBJS} | tsort` ${LDADD}          @${AR} cTq lib${LIB}_p.a `lorder ${POBJS} | tsort` ${LDADD}
         ${RANLIB} lib${LIB}_p.a          ${RANLIB} lib${LIB}_p.a
   
   SOBJS+= ${OBJS:.o=.so}
   lib${LIB}_pic.a:: ${SOBJS}
           @echo building shared object ${LIB} library
           @rm -f lib${LIB}_pic.a
           @${AR} cTq lib${LIB}_pic.a `lorder ${SOBJS} | tsort` ${LDADD}
           ${RANLIB} lib${LIB}_pic.a
   
 llib-l${LIB}.ln: ${SRCS}  llib-l${LIB}.ln: ${SRCS}
         ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c}          ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c}
   
Line 74  clean:
Line 100  clean:
         rm -f a.out Errs errs mklog core ${CLEANFILES}          rm -f a.out Errs errs mklog core ${CLEANFILES}
         rm -f ${OBJS}          rm -f ${OBJS}
         rm -f ${POBJS} profiled/*.o          rm -f ${POBJS} profiled/*.o
         rm -f lib${LIB}.a lib${LIB}_p.a llib-l${LIB}.ln          rm -f ${SOBJS} shared/*.o
           rm -f lib${LIB}.a lib${LIB}_p.a lib${LIB}_pic.a llib-l${LIB}.ln
 .endif  .endif
   
   cleandir: clean
   
   .if defined(SRCS)
 afterdepend:  afterdepend:
         @(TMP=/tmp/_depend$$$$; \          @(TMP=/tmp/_depend$$$$; \
             sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po:/' < .depend > $$TMP; \              sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so:/' < .depend > $$TMP; \
             mv $$TMP .depend)              mv $$TMP .depend)
   .endif
   
 .if !target(install)  .if !target(install)
 .if !target(beforeinstall)  .if !target(beforeinstall)
Line 99  realinstall:
Line 130  realinstall:
             lib${LIB}_p.a ${DESTDIR}${LIBDIR}              lib${LIB}_p.a ${DESTDIR}${LIBDIR}
         ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a          ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
 .endif  .endif
   .if !defined(NOPIC) && defined(INSTALL_PIC_ARCHIVE)
   #       ranlib lib${LIB}_pic.a
           install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
               lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
           ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
   .endif
 #       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}
 .if defined(LINKS) && !empty(LINKS)  .if defined(LINKS) && !empty(LINKS)
Line 120  afterinstall: realinstall
Line 157  afterinstall: realinstall
 realinstall: beforeinstall  realinstall: beforeinstall
 .endif  .endif
   
 cleandir: clean  
   
 .if !defined(NOMAN)  .if !defined(NOMAN)
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .endif  .endif
   
 .include <bsd.obj.mk>  .include <bsd.obj.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
 .include <bsd.subdir.mk>  

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.32

CVSweb <webmaster@jp.NetBSD.org>