bsd.lib.mk revision 1.141       1  1.141  wrstuden #	$NetBSD: bsd.lib.mk,v 1.141 1998/10/07 17:49:15 wrstuden Exp $
      2   1.92     mikel #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
      3    1.1       cgd 
      4  1.117   mycroft .if !target(__initialized__)
      5  1.117   mycroft __initialized__:
      6    1.1       cgd .if exists(${.CURDIR}/../Makefile.inc)
      7    1.1       cgd .include "${.CURDIR}/../Makefile.inc"
      8    1.1       cgd .endif
      9   1.97   mycroft .include <bsd.own.mk>
     10  1.117   mycroft .include <bsd.obj.mk>
     11  1.117   mycroft .MAIN:		all
     12  1.117   mycroft .endif
     13   1.97   mycroft 
     14   1.96   mycroft .PHONY:		cleanlib libinstall
     15  1.103   mycroft realinstall:	libinstall
     16  1.137     lukem clean cleandir distclean: cleanlib
     17    1.1       cgd 
     18   1.35        pk .if exists(${.CURDIR}/shlib_version)
     19   1.37       cgd SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
     20   1.37       cgd SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
     21   1.35        pk .endif
     22    1.1       cgd 
     23  1.101   mycroft # add additional suffixes not exported.
     24  1.101   mycroft # .po is used for profiling object files.
     25  1.101   mycroft # .so is used for PIC object files.
     26  1.118     lukem .SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .m .F .f .r .y .l .cl .p .h
     27  1.118     lukem .SUFFIXES: .sh .m4 .m
     28   1.82     mikel 
     29   1.86  jonathan 
     30   1.86  jonathan # Set PICFLAGS to cc flags for producing position-independent code,
     31   1.86  jonathan # if not already set.  Includes -DPIC, if required.
     32   1.86  jonathan 
     33   1.86  jonathan # Data-driven table using make variables to control  how shared libraries
     34   1.86  jonathan # are built for different platforms and object formats.
     35  1.125  jonathan # OBJECT_FMT:		currently either "ELF" or "a.out", from <bsd.own.mk>
     36   1.86  jonathan # SHLIB_SOVERSION:  	version number to be compiled into a shared library
     37   1.86  jonathan #                    	via -soname. Usualy ${SHLIB_MAJOR} on ELF.
     38   1.86  jonathan #   			NetBSD/pmax used to use ${SHLIB_MAJOR}.{SHLIB-MINOR}.
     39  1.123  jonathan # SHLIB_SHFLAGS:	Flags to tell ${LD} to emit  shared library.
     40  1.123  jonathan #			with ELF, also set shared-lib version for ld.so.
     41  1.123  jonathan # SHLIB_LDSTARTFILE:	support .o file, call C++ file-level constructors
     42  1.123  jonathan # SHLIB_LDENDFILE:	support .o file, call C++ file-level destructors
     43  1.107  jonathan # CPPICFLAGS:	flags for ${CPP} to preprocess  .[sS]  files for ${AS}
     44  1.107  jonathan # CPICFLAGS:	flags for ${CC} to compile  .[cC] files to .so objects.
     45  1.107  jonathan # CAPICFLAGS	flags for {$CC} to compiling .[Ss] files
     46  1.107  jonathan #		 	(usually just ${CPPPICFLAGS} ${CPICFLAGS})
     47  1.107  jonathan # APICFLAGS:	flags for ${AS} to assemble .[sS]  to .so objects.
     48   1.86  jonathan 
     49   1.86  jonathan .if (${MACHINE_ARCH} == "alpha")
     50  1.123  jonathan 		# Alpha-specific shared library flags
     51  1.115       cjs SHLIB_LDSTARTFILE= ${DESTDIR}/usr/lib/crtbeginS.o
     52  1.115       cjs SHLIB_LDENDFILE= ${DESTDIR}/usr/lib/crtendS.o
     53  1.123  jonathan 
     54   1.86  jonathan CPICFLAGS ?= -fpic -DPIC
     55  1.107  jonathan CPPPICFLAGS?= -DPIC 
     56  1.107  jonathan CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
     57  1.107  jonathan APICFLAGS ?=
     58   1.86  jonathan .elif (${MACHINE_ARCH} == "mips")
     59  1.123  jonathan 		# mips-specific shared library flags
     60  1.123  jonathan # Still use gnu-derived ld.so on pmax; don't have or need lib<>.so support.
     61   1.86  jonathan SHLIB_LDSTARTFILE=
     62   1.86  jonathan SHLIB_LDENDFILE=
     63   1.86  jonathan 
     64   1.86  jonathan # On mips, all libs need to be compiled with ABIcalls, not just sharedlibs.
     65   1.86  jonathan CPICFLAGS?=
     66   1.86  jonathan APICFLAGS?=
     67   1.86  jonathan #CPICFLAGS?= -fpic -DPIC
     68   1.86  jonathan #APICFLAGS?= -DPIC
     69   1.86  jonathan 
     70   1.86  jonathan # so turn shlib PIC flags on for ${CPP}, ${CC}, and ${AS} as follows:
     71   1.86  jonathan AINC+=-DPIC -DABICALLS
     72   1.86  jonathan COPTS+=	-fPIC ${AINC}
     73   1.86  jonathan AFLAGS+= -fPIC
     74   1.86  jonathan AS+=	-KPIC
     75   1.86  jonathan 
     76   1.86  jonathan .else
     77   1.86  jonathan 
     78  1.125  jonathan # Platform-independent flags for NetBSD a.out shared libraries (and PowerPC)
     79   1.88       cgd SHLIB_LDSTARTFILE=
     80   1.88       cgd SHLIB_LDENDFILE=
     81  1.125  jonathan SHLIB_SHFLAGS=
     82   1.86  jonathan SHLIB_SOVERSION=${SHLIB_MAJOR}.${SHLIB_MINOR}
     83  1.116        pk CPICFLAGS?= -fpic -DPIC
     84  1.107  jonathan CPPPICFLAGS?= -DPIC 
     85  1.107  jonathan CAPICFLAGS?= ${CPPPICFLAGS} ${CPICFLAGS}
     86  1.107  jonathan APICFLAGS?= -k
     87   1.86  jonathan 
     88   1.86  jonathan .endif
     89   1.86  jonathan 
     90  1.123  jonathan # Platform-independent linker flags for ELF shared libraries
     91  1.125  jonathan .if (${OBJECT_FMT} == "ELF")
     92  1.123  jonathan SHLIB_SOVERSION=${SHLIB_MAJOR}
     93  1.125  jonathan SHLIB_SHFLAGS=-soname lib${LIB}.so.${SHLIB_SOVERSION}
     94  1.123  jonathan .endif
     95   1.86  jonathan 
     96   1.82     mikel CFLAGS+=	${COPTS}
     97    1.1       cgd 
     98    1.1       cgd .c.o:
     99   1.80  christos 	@echo ${COMPILE.c:Q} ${.IMPSRC}
    100  1.122       cgd 	@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
    101   1.62  christos 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    102   1.62  christos 	@rm -f ${.TARGET}.o
    103    1.1       cgd 
    104    1.1       cgd .c.po:
    105   1.80  christos 	@echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
    106   1.68       cgd 	@${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
    107   1.62  christos 	@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
    108   1.62  christos 	@rm -f ${.TARGET}.o
    109   1.17   mycroft 
    110   1.27        pk .c.so:
    111   1.86  jonathan 	@echo ${COMPILE.c:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
    112   1.86  jonathan 	@${COMPILE.c} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
    113   1.62  christos 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    114   1.62  christos 	@rm -f ${.TARGET}.o
    115   1.27        pk 
    116   1.58       cgd .c.ln:
    117  1.121   thorpej 	${LINT} ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC}
    118   1.58       cgd 
    119   1.18   mycroft .cc.o .C.o:
    120   1.80  christos 	@echo ${COMPILE.cc:Q} ${.IMPSRC}
    121   1.62  christos 	@${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o
    122   1.63       jtc 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    123   1.62  christos 	@rm -f ${.TARGET}.o
    124   1.17   mycroft 
    125   1.18   mycroft .cc.po .C.po:
    126   1.80  christos 	@echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
    127   1.68       cgd 	@${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
    128   1.62  christos 	@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
    129   1.62  christos 	@rm -f ${.TARGET}.o
    130   1.28       cgd 
    131   1.28       cgd .cc.so .C.so:
    132   1.86  jonathan 	@echo ${COMPILE.cc:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
    133   1.86  jonathan 	@${COMPILE.cc} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
    134   1.62  christos 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    135   1.62  christos 	@rm -f ${.TARGET}.o
    136  1.118     lukem 
    137  1.118     lukem .m.o:
    138  1.118     lukem 	@echo ${COMPILE.m:Q} ${.IMPSRC}
    139  1.122       cgd 	@${COMPILE.m} ${.IMPSRC} -o ${.TARGET}.o
    140  1.118     lukem 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    141  1.118     lukem 	@rm -f ${.TARGET}.o
    142  1.118     lukem 
    143  1.118     lukem .m.po:
    144  1.118     lukem 	@echo ${COMPILE.m:Q} -pg ${.IMPSRC} -o ${.TARGET}
    145  1.118     lukem 	@${COMPILE.m} -pg ${.IMPSRC} -o ${.TARGET}.o
    146  1.118     lukem 	@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
    147  1.118     lukem 	@rm -f ${.TARGET}.o
    148  1.118     lukem 
    149  1.118     lukem .m.so:
    150  1.118     lukem 	@echo ${COMPILE.m:Q} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}
    151  1.118     lukem 	@${COMPILE.m} ${CPICFLAGS} ${.IMPSRC} -o ${.TARGET}.o
    152  1.118     lukem 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    153  1.118     lukem 	@rm -f ${.TARGET}.o
    154    1.1       cgd 
    155   1.40       cgd .S.o .s.o:
    156   1.80  christos 	@echo ${COMPILE.S:Q} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC}
    157   1.69       jtc 	@${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
    158   1.62  christos 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    159   1.62  christos 	@rm -f ${.TARGET}.o
    160    1.1       cgd 
    161   1.40       cgd .S.po .s.po:
    162   1.80  christos 	@echo ${COMPILE.S:Q} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
    163   1.75       jtc 	@${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
    164   1.62  christos 	@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
    165   1.62  christos 	@rm -f ${.TARGET}.o
    166    1.1       cgd 
    167   1.40       cgd .S.so .s.so:
    168  1.107  jonathan 	@echo ${COMPILE.S:Q} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}
    169  1.107  jonathan 	@${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o
    170   1.62  christos 	@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
    171   1.62  christos 	@rm -f ${.TARGET}.o
    172   1.27        pk 
    173  1.139        tv .if defined(NOPIC) || (defined(LDSTATIC) && ${LDSTATIC} != "") \
    174  1.139        tv 	|| !defined(NOLINKLIB)
    175  1.130        tv _LIBS=lib${LIB}.a
    176  1.130        tv .else
    177  1.130        tv _LIBS=
    178  1.130        tv .endif
    179   1.58       cgd 
    180  1.139        tv .if !defined(NOPROFILE) && !defined(NOLINKLIB)
    181  1.130        tv _LIBS+=lib${LIB}_p.a
    182    1.1       cgd .endif
    183    1.1       cgd 
    184   1.27        pk .if !defined(NOPIC)
    185   1.27        pk _LIBS+=lib${LIB}_pic.a
    186   1.37       cgd .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
    187   1.37       cgd _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    188   1.27        pk .endif
    189   1.35        pk .endif
    190   1.27        pk 
    191  1.139        tv .if !defined(NOLINT) && !defined(NOLINKLIB)
    192   1.58       cgd _LIBS+=llib-l${LIB}.ln
    193   1.27        pk .endif
    194   1.27        pk 
    195  1.102   mycroft all: ${SRCS} ${_LIBS}
    196    1.1       cgd 
    197   1.90  christos __archivebuild: .USE
    198   1.89  christos 	@rm -f ${.TARGET}
    199  1.138        tv 	@${AR} cq ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
    200   1.89  christos 	${RANLIB} ${.TARGET}
    201   1.89  christos 
    202   1.89  christos __archiveinstall: .USE
    203  1.140  christos 	${INSTALL} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \
    204  1.140  christos 		${.ALLSRC} ${.TARGET}
    205   1.89  christos 	${RANLIB} -t ${.TARGET}
    206   1.89  christos 	chmod ${LIBMODE} ${.TARGET}
    207   1.89  christos 
    208  1.104   mycroft DPSRCS+=	${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
    209  1.128        tv CLEANFILES+=	${DPSRCS}
    210  1.129        tv .if defined(YHEADER)
    211  1.129        tv CLEANFILES+=	${SRCS:M*.y:.y=.h}
    212  1.129        tv .endif
    213  1.103   mycroft 
    214  1.103   mycroft OBJS+=		${SRCS:N*.h:N*.sh:R:S/$/.o/g}
    215   1.89  christos lib${LIB}.a:: ${OBJS} __archivebuild
    216    1.1       cgd 	@echo building standard ${LIB} library
    217    1.1       cgd 
    218  1.103   mycroft POBJS+=		${OBJS:.o=.po}
    219   1.89  christos lib${LIB}_p.a:: ${POBJS} __archivebuild
    220    1.1       cgd 	@echo building profiled ${LIB} library
    221    1.1       cgd 
    222  1.103   mycroft SOBJS+=		${OBJS:.o=.so}
    223   1.89  christos lib${LIB}_pic.a:: ${SOBJS} __archivebuild
    224   1.27        pk 	@echo building shared object ${LIB} library
    225   1.27        pk 
    226   1.88       cgd lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD} \
    227   1.88       cgd     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
    228   1.38       cgd 	@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
    229   1.37       cgd 	@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    230  1.126  jonathan 	$(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
    231  1.123  jonathan 	    ${SHLIB_LDSTARTFILE} \
    232  1.126  jonathan 	    --whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \
    233  1.115       cjs 	    ${SHLIB_LDENDFILE}
    234  1.133        tv .if (${OBJECT_FMT} == "ELF")
    235  1.135        tv 	rm -f lib${LIB}.so.${SHLIB_MAJOR}
    236  1.133        tv 	ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
    237  1.135        tv 	    lib${LIB}.so.${SHLIB_MAJOR}
    238  1.135        tv 	rm -f lib${LIB}.so
    239  1.133        tv 	ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
    240  1.135        tv 	    lib${LIB}.so
    241  1.133        tv .endif
    242   1.35        pk 
    243  1.103   mycroft LOBJS+=		${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
    244  1.103   mycroft LLIBS?=		-lc
    245   1.58       cgd llib-l${LIB}.ln: ${LOBJS}
    246   1.58       cgd 	@echo building llib-l${LIB}.ln
    247   1.58       cgd 	@rm -f llib-l${LIB}.ln
    248  1.141  wrstuden 	@${LINT} -C${LIB} ${.ALLSRC} ${LLIBS}
    249    1.1       cgd 
    250   1.81       cgd cleanlib:
    251   1.48   mycroft 	rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES}
    252   1.59       cgd 	rm -f lib${LIB}.a ${OBJS}
    253   1.59       cgd 	rm -f lib${LIB}_p.a ${POBJS}
    254  1.133        tv 	rm -f lib${LIB}_pic.a lib${LIB}.so.* lib${LIB}.so ${SOBJS}
    255   1.59       cgd 	rm -f llib-l${LIB}.ln ${LOBJS}
    256    1.1       cgd 
    257   1.26   mycroft .if defined(SRCS)
    258   1.64  christos afterdepend: .depend
    259    1.1       cgd 	@(TMP=/tmp/_depend$$$$; \
    260   1.79       cgd 	    sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \
    261   1.58       cgd 	      < .depend > $$TMP; \
    262    1.1       cgd 	    mv $$TMP .depend)
    263   1.26   mycroft .endif
    264    1.1       cgd 
    265   1.97   mycroft .if !target(libinstall)
    266  1.139        tv # Make sure it gets defined, in case NOPIC && NOLINKLIB are defined
    267  1.139        tv libinstall::
    268  1.139        tv 
    269  1.139        tv .if !defined(NOLINKLIB)
    270   1.89  christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a
    271   1.89  christos .if !defined(UPDATE)
    272   1.89  christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a
    273   1.89  christos .endif
    274   1.89  christos .if !defined(BUILD)
    275   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE
    276   1.89  christos .endif
    277   1.89  christos 
    278   1.95   mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a
    279   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall
    280  1.130        tv .endif
    281   1.89  christos 
    282  1.139        tv .if !defined(NOPROFILE) && !defined(NOLINKLIB)
    283   1.89  christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
    284   1.89  christos .if !defined(UPDATE)
    285   1.89  christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
    286   1.32        pk .endif
    287   1.89  christos .if !defined(BUILD)
    288   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE
    289   1.89  christos .endif
    290   1.89  christos 
    291   1.95   mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a
    292   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall
    293   1.89  christos .endif
    294   1.89  christos 
    295  1.139        tv .if !defined(NOPIC) && !defined(NOPICINSTALL) && !defined(NOLINKLIB)
    296   1.89  christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
    297   1.89  christos .if !defined(UPDATE)
    298   1.89  christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
    299   1.89  christos .endif
    300   1.89  christos .if !defined(BUILD)
    301   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE
    302   1.33        pk .endif
    303   1.89  christos 
    304   1.95   mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a
    305   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall
    306   1.89  christos .endif
    307   1.89  christos 
    308   1.37       cgd .if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
    309   1.89  christos libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    310   1.89  christos .if !defined(UPDATE)
    311   1.89  christos .PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    312   1.89  christos .endif
    313   1.89  christos .if !defined(BUILD)
    314   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE
    315   1.89  christos .endif
    316   1.92     mikel 
    317   1.95   mycroft .PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    318   1.89  christos ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
    319  1.140  christos 	${INSTALL} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
    320  1.140  christos 		${.ALLSRC} ${.TARGET}
    321  1.125  jonathan .if (${OBJECT_FMT} == "ELF")
    322   1.83       cgd 	rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
    323   1.83       cgd 	ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
    324   1.83       cgd 	    ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}
    325   1.83       cgd 	rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.so
    326  1.139        tv .if !defined(NOLINKLIB)
    327   1.83       cgd 	ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
    328   1.83       cgd 	    ${DESTDIR}${LIBDIR}/lib${LIB}.so
    329   1.83       cgd .endif
    330   1.12       cgd .endif
    331  1.139        tv .endif
    332   1.89  christos 
    333  1.139        tv .if !defined(NOLINT) && !defined(NOLINKLIB)
    334   1.89  christos libinstall:: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
    335   1.89  christos .if !defined(UPDATE)
    336   1.89  christos .PHONY: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
    337   1.89  christos .endif
    338   1.89  christos .if !defined(BUILD)
    339   1.89  christos ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE
    340   1.89  christos .endif
    341   1.89  christos 
    342   1.95   mycroft .PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln
    343   1.95   mycroft ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln
    344  1.140  christos 	${INSTALL} ${PRESERVE} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
    345  1.136  christos 	    ${.ALLSRC} ${DESTDIR}${LINTLIBDIR}
    346   1.58       cgd .endif
    347    1.1       cgd .endif
    348    1.1       cgd 
    349    1.1       cgd .include <bsd.man.mk>
    350   1.57       jtc .include <bsd.nls.mk>
    351   1.91  christos .include <bsd.files.mk>
    352   1.89  christos .include <bsd.inc.mk>
    353  1.109       cjs .include <bsd.links.mk>
    354   1.24   mycroft .include <bsd.dep.mk>
    355   1.66  christos .include <bsd.sys.mk>
    356  1.117   mycroft 
    357  1.117   mycroft # Make sure all of the standard targets are defined, even if they do nothing.
    358  1.117   mycroft lint regress:
    359