[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.53 and 1.60

version 1.53, 1994/08/09 13:04:28 version 1.60, 1995/06/27 20:37:29
Line 5 
Line 5 
 .include "${.CURDIR}/../Makefile.inc"  .include "${.CURDIR}/../Makefile.inc"
 .endif  .endif
   
   .include <bsd.own.mk>                           # for 'NOPIC' definition
   
 .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
Line 12  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
Line 14  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
   
 .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  # .so used for PIC object files.  .ln used for lint output files.
 .SUFFIXES:  .SUFFIXES:
 .SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .m4  .SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .ln .m4
   
 .c.o:  .c.o:
         ${CC} ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC}          ${COMPILE.c} ${.IMPSRC}
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
 .c.po:  .c.po:
         ${CC} -p ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} -p ${.IMPSRC} -o ${.TARGET}
         @${LD} -X -r ${.TARGET}          @${LD} -X -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
 .c.so:  .c.so:
         ${CC} ${PICFLAG} -DPIC ${CFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}          ${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
   .c.ln:
           ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} -i ${.IMPSRC}
   
 .cc.o .C.o:  .cc.o .C.o:
         ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c ${.IMPSRC}          ${COMPILE.cc} ${.IMPSRC}
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
 .cc.po .C.po:  .cc.po .C.po:
         ${CXX} -p ${CXXFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}          ${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}
         @${LD} -X -r ${.TARGET}          @${LD} -X -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
 .cc.so .C.so:  .cc.so .C.so:
         ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} ${CPPFLAGS} -c ${.IMPSRC} -o ${.TARGET}          ${COMPILE.cc} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
Line 65  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
Line 70  SHLIB_MINOR != . ${.CURDIR}/shlib_versio
         @${LD} -x -r ${.TARGET}          @${LD} -x -r ${.TARGET}
         @mv a.out ${.TARGET}          @mv a.out ${.TARGET}
   
   .if !defined(PICFLAG)
   PICFLAG=-fpic
   .endif
   
 .if !defined(NOPROFILE)  .if !defined(NOPROFILE)
 _LIBS=lib${LIB}.a lib${LIB}_p.a  _LIBS=lib${LIB}.a lib${LIB}_p.a
 .else  .else
Line 78  _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL
Line 87  _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL
 .endif  .endif
 .endif  .endif
   
 .if !defined(PICFLAG)  .if !defined(NOLINT)
 PICFLAG=-fpic  _LIBS+=llib-l${LIB}.ln
 .endif  .endif
   
 all: ${_LIBS} _SUBDIRUSE # llib-l${LIB}.ln  all: ${_LIBS} _SUBDIRUSE
   
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}  OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
   
Line 112  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
Line 121  lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO
         $(LD) -x -Bshareable -Bforcearchive \          $(LD) -x -Bshareable -Bforcearchive \
             -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}              -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
   
 llib-l${LIB}.ln: ${SRCS}  LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
         ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c}  # the following looks XXX to me... -- cgd
   LLIBS?= -lc
   llib-l${LIB}.ln: ${LOBJS}
           @echo building llib-l${LIB}.ln
           @rm -f llib-l${LIB}.ln
           @${LINT} -C${LIB} ${LOBJS} ${LLIBS}
   
 .if !target(clean)  .if !target(clean)
 clean: _SUBDIRUSE  clean: _SUBDIRUSE
         rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}          rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
         rm -f ${OBJS}          rm -f lib${LIB}.a ${OBJS}
         rm -f ${POBJS} profiled/*.o          rm -f lib${LIB}_p.a ${POBJS}
         rm -f ${SOBJS} shared/*.o          rm -f lib${LIB}_pic.a $lib${LIB}.so.*.* ${SOBJS}
         rm -f lib${LIB}.a lib${LIB}_p.a lib${LIB}_pic.a llib-l${LIB}.ln          rm -f llib-l${LIB}.ln ${LOBJS}
         rm -f lib${LIB}.so.*.*  
 .endif  .endif
   
 cleandir: _SUBDIRUSE clean  cleandir: _SUBDIRUSE clean
Line 130  cleandir: _SUBDIRUSE clean
Line 143  cleandir: _SUBDIRUSE clean
 .if defined(SRCS)  .if defined(SRCS)
 afterdepend:  afterdepend:
         @(TMP=/tmp/_depend$$$$; \          @(TMP=/tmp/_depend$$$$; \
             sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so:/' < .depend > $$TMP; \              sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so:/' \
                 < .depend > $$TMP; \
             mv $$TMP .depend)              mv $$TMP .depend)
 .endif  .endif
   
Line 141  beforeinstall:
Line 155  beforeinstall:
   
 realinstall:  realinstall:
 #       ranlib lib${LIB}.a  #       ranlib lib${LIB}.a
         install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} lib${LIB}.a \          install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 lib${LIB}.a \
             ${DESTDIR}${LIBDIR}              ${DESTDIR}${LIBDIR}
         ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a          ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a
           chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a
 .if !defined(NOPROFILE)  .if !defined(NOPROFILE)
 #       ranlib lib${LIB}_p.a  #       ranlib lib${LIB}_p.a
         install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \
             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
           chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
 .endif  .endif
 .if !defined(NOPIC)  .if !defined(NOPIC)
 #       ranlib lib${LIB}_pic.a  #       ranlib lib${LIB}_pic.a
         install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \
             lib${LIB}_pic.a ${DESTDIR}${LIBDIR}              lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
         ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a          ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
           chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
 .endif  .endif
 .if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)  .if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
         install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \          install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
             lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR}              lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR}
 .endif  .endif
 #       install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \  .if !defined(NOLINT)
 #           llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}          install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
               llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR}
   .endif
 .if defined(LINKS) && !empty(LINKS)  .if defined(LINKS) && !empty(LINKS)
         @set ${LINKS}; \          @set ${LINKS}; \
         while test $$# -ge 2; do \          while test $$# -ge 2; do \
Line 185  realinstall: beforeinstall
Line 204  realinstall: beforeinstall
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .endif  .endif
   
   .if !defined(NONLS)
   .include <bsd.nls.mk>
   .endif
   
 .include <bsd.obj.mk>  .include <bsd.obj.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
 .include <bsd.subdir.mk>  .include <bsd.subdir.mk>

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.60

CVSweb <webmaster@jp.NetBSD.org>