1994-08-04 21:09:27 +00:00
|
|
|
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
|
1998-08-08 13:22:06 +00:00
|
|
|
# $Id: bsd.lib.mk,v 1.76 1998/08/08 13:11:44 peter Exp $
|
1994-08-04 21:09:27 +00:00
|
|
|
#
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1998-08-08 07:02:08 +00:00
|
|
|
.if !target(__initialized__)
|
|
|
|
__initialized__:
|
1994-05-30 19:09:18 +00:00
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
1998-08-08 07:02:08 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1997-09-05 09:09:56 +00:00
|
|
|
# Default executable format
|
1998-01-13 06:00:56 +00:00
|
|
|
.if ${MACHINE} == "alpha"
|
|
|
|
BINFORMAT?= elf
|
|
|
|
.else
|
1997-09-05 09:09:56 +00:00
|
|
|
BINFORMAT?= aout
|
1998-01-13 06:00:56 +00:00
|
|
|
.endif
|
1997-09-05 09:09:56 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.if exists(${.CURDIR}/shlib_version)
|
|
|
|
SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major
|
1997-08-30 23:23:18 +00:00
|
|
|
.if ${BINFORMAT} == aout
|
1994-08-04 21:09:27 +00:00
|
|
|
SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor
|
|
|
|
.endif
|
1997-08-30 23:23:18 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1997-09-05 11:45:15 +00:00
|
|
|
.if !defined(NOPIC) && ${BINFORMAT} == elf
|
|
|
|
SONAME?= lib${LIB}.so.${SHLIB_MAJOR}
|
|
|
|
.endif
|
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
CFLAGS+= -I${DESTDIR}/usr/include
|
1997-05-23 08:38:46 +00:00
|
|
|
CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
1994-08-28 15:37:40 +00:00
|
|
|
|
1994-09-16 14:30:25 +00:00
|
|
|
.if defined(DEBUG_FLAGS)
|
|
|
|
CFLAGS+= ${DEBUG_FLAGS}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(DEBUG_FLAGS)
|
1994-05-30 19:09:18 +00:00
|
|
|
STRIP?= -s
|
1994-09-16 14:30:25 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1997-12-17 13:36:44 +00:00
|
|
|
.if ${BINFORMAT} != aout || make(checkdpadd)
|
1996-09-28 06:01:01 +00:00
|
|
|
.include <bsd.libnames.mk>
|
1997-12-17 13:36:44 +00:00
|
|
|
.endif
|
1996-09-28 06:01:01 +00:00
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.MAIN: all
|
|
|
|
|
|
|
|
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
|
1994-08-04 21:09:27 +00:00
|
|
|
# .so used for PIC object files
|
1994-05-30 19:09:18 +00:00
|
|
|
.SUFFIXES:
|
1998-06-05 18:38:55 +00:00
|
|
|
.SUFFIXES: .out .o .po .so .s .S .c .cc .cpp .cxx .m .C .f .y .l
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
.c.o:
|
1994-08-04 21:09:27 +00:00
|
|
|
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
.c.po:
|
1997-04-09 20:31:15 +00:00
|
|
|
${CC} -pg ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.c.so:
|
|
|
|
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1998-06-05 18:38:55 +00:00
|
|
|
.cc.o .C.o .cpp.o .cxx.o:
|
1994-08-04 21:09:27 +00:00
|
|
|
${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1998-06-05 18:38:55 +00:00
|
|
|
.cc.po .C.po .cpp.po .cxx.po:
|
1997-04-09 20:31:15 +00:00
|
|
|
${CXX} -pg ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1998-06-05 18:38:55 +00:00
|
|
|
.cc.so .C.so .cpp.so .cxx.so:
|
1994-08-04 21:09:27 +00:00
|
|
|
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.f.o:
|
|
|
|
${FC} ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.f.po:
|
1997-04-09 20:31:15 +00:00
|
|
|
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.f.so:
|
|
|
|
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1998-05-15 09:30:13 +00:00
|
|
|
.m.o:
|
|
|
|
${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1998-05-15 09:30:13 +00:00
|
|
|
|
|
|
|
.m.po:
|
|
|
|
${OBJC} ${OBJCFLAGS} -pg -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1998-05-15 09:30:13 +00:00
|
|
|
|
|
|
|
.m.so:
|
|
|
|
${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1998-05-15 09:30:13 +00:00
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.s.o:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} -x assembler-with-cpp ${CFLAGS:M-[BID]*} ${AINC} -c \
|
1996-08-11 12:24:44 +00:00
|
|
|
${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
.s.po:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} -x assembler-with-cpp -DPROF ${CFLAGS:M-[BID]*} ${AINC} -c \
|
1996-08-11 12:24:44 +00:00
|
|
|
${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.s.so:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} -x assembler-with-cpp -fpic -DPIC ${CFLAGS:M-[BID]*} ${AINC} -c \
|
1996-08-11 12:24:44 +00:00
|
|
|
${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.S.o:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} ${CFLAGS:M-[BID]*} ${AINC} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.S.po:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} -DPROF ${CFLAGS:M-[BID]*} ${AINC} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.S.so:
|
1997-06-18 03:39:34 +00:00
|
|
|
${CC} -fpic -DPIC ${CFLAGS:M-[BID]*} ${AINC} -c ${.IMPSRC} -o ${.TARGET}
|
1998-08-08 13:11:44 +00:00
|
|
|
@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
|
|
|
|
@mv ${.TARGET}.tmp ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1994-09-18 22:22:32 +00:00
|
|
|
.if !defined(INTERNALLIB) || defined(INTERNALSTATICLIB)
|
1994-09-18 22:06:04 +00:00
|
|
|
.if !defined(NOPROFILE) && !defined(INTERNALLIB)
|
1994-05-30 19:09:18 +00:00
|
|
|
_LIBS=lib${LIB}.a lib${LIB}_p.a
|
|
|
|
.else
|
|
|
|
_LIBS=lib${LIB}.a
|
|
|
|
.endif
|
1994-09-18 22:22:32 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.if !defined(NOPIC)
|
1997-08-30 23:23:18 +00:00
|
|
|
.if ${BINFORMAT} == aout
|
1994-08-04 21:09:27 +00:00
|
|
|
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
|
|
|
|
_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
|
|
|
.endif
|
1997-08-30 23:23:18 +00:00
|
|
|
.else
|
|
|
|
.if defined(SHLIB_MAJOR)
|
|
|
|
_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}
|
|
|
|
.endif
|
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
.if defined(INSTALL_PIC_ARCHIVE)
|
|
|
|
_LIBS+=lib${LIB}_pic.a
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(PICFLAG)
|
|
|
|
PICFLAG=-fpic
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
1996-09-18 06:09:19 +00:00
|
|
|
all: objwarn ${_LIBS} all-man _SUBDIR # llib-l${LIB}.ln
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
lib${LIB}.a:: ${OBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building standard ${LIB} library
|
1994-05-30 19:09:18 +00:00
|
|
|
@rm -f lib${LIB}.a
|
1996-08-03 06:43:05 +00:00
|
|
|
@${AR} cq lib${LIB}.a `lorder ${OBJS} | tsort -q` ${ARADD}
|
1994-08-04 21:09:27 +00:00
|
|
|
${RANLIB} lib${LIB}.a
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
POBJS+= ${OBJS:.o=.po}
|
1998-08-08 13:22:06 +00:00
|
|
|
.if !defined(NOPROFILE)
|
1994-05-30 19:09:18 +00:00
|
|
|
lib${LIB}_p.a:: ${POBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building profiled ${LIB} library
|
1994-05-30 19:09:18 +00:00
|
|
|
@rm -f lib${LIB}_p.a
|
1996-08-03 06:43:05 +00:00
|
|
|
@${AR} cq lib${LIB}_p.a `lorder ${POBJS} | tsort -q` ${ARADD}
|
1994-08-04 21:09:27 +00:00
|
|
|
${RANLIB} lib${LIB}_p.a
|
1994-10-25 17:55:25 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.if defined(DESTDIR)
|
1998-06-04 15:15:38 +00:00
|
|
|
LDDESTDIRENV?= LIBRARY_PATH=${DESTDIR}${SHLIBDIR}:${DESTDIR}${LIBDIR}
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
SOBJS+= ${OBJS:.o=.so}
|
1997-08-30 23:23:18 +00:00
|
|
|
|
1998-08-08 13:22:06 +00:00
|
|
|
.if !defined(NOPIC)
|
1997-08-30 23:23:18 +00:00
|
|
|
.if ${BINFORMAT} == aout
|
1994-08-04 21:09:27 +00:00
|
|
|
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
|
1994-08-04 21:09:27 +00:00
|
|
|
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
|
1997-05-23 17:50:35 +00:00
|
|
|
@${LDDESTDIRENV} ${CC} -shared -Wl,-x -Wl,-assert -Wl,pure-text \
|
1994-08-04 21:09:27 +00:00
|
|
|
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
1996-08-03 06:43:05 +00:00
|
|
|
`lorder ${SOBJS} | tsort -q` ${LDDESTDIR} ${LDADD}
|
1997-08-30 23:23:18 +00:00
|
|
|
.else
|
|
|
|
lib${LIB}.so.${SHLIB_MAJOR}: ${SOBJS}
|
|
|
|
@${ECHO} building shared ${LIB} library \(version ${SHLIB_MAJOR}\)
|
|
|
|
@rm -f lib${LIB}.so.${SHLIB_MAJOR}
|
|
|
|
@${LDDESTDIRENV} ${CC} -shared -Wl,-x \
|
1997-09-05 11:45:15 +00:00
|
|
|
-o lib${LIB}.so.${SHLIB_MAJOR} -Wl,-soname,${SONAME} \
|
1997-08-30 23:23:18 +00:00
|
|
|
`lorder ${SOBJS} | tsort -q` ${LDDESTDIR} ${LDADD}
|
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
lib${LIB}_pic.a:: ${SOBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building special pic ${LIB} library
|
1994-08-04 21:09:27 +00:00
|
|
|
@rm -f lib${LIB}_pic.a
|
1994-12-28 00:49:58 +00:00
|
|
|
@${AR} cq lib${LIB}_pic.a ${SOBJS} ${ARADD}
|
1994-08-04 21:09:27 +00:00
|
|
|
${RANLIB} lib${LIB}_pic.a
|
1994-10-25 17:55:25 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
llib-l${LIB}.ln: ${SRCS}
|
|
|
|
${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c}
|
|
|
|
|
|
|
|
.if !target(clean)
|
1996-06-24 04:26:21 +00:00
|
|
|
clean: _SUBDIR
|
1998-08-08 13:22:06 +00:00
|
|
|
rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${CLEANFILES}
|
1997-12-17 13:36:44 +00:00
|
|
|
rm -f lib${LIB}.a # llib-l${LIB}.ln
|
1998-08-08 13:22:06 +00:00
|
|
|
rm -f ${POBJS} ${POBJS:S/$/.tmp/} lib${LIB}_p.a
|
|
|
|
rm -f ${SOBJS} ${SOBJS:S/$/.tmp/} lib${LIB}.so.*.* lib${LIB}_pic.a
|
1996-06-29 03:12:49 +00:00
|
|
|
.if defined(CLEANDIRS) && !empty(CLEANDIRS)
|
1996-06-17 15:59:52 +00:00
|
|
|
rm -rf ${CLEANDIRS}
|
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
1998-03-07 13:13:41 +00:00
|
|
|
_EXTRADEPEND:
|
1997-04-09 16:10:27 +00:00
|
|
|
@TMP=_depend$$$$; \
|
|
|
|
sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so:/' < ${DEPENDFILE} \
|
|
|
|
> $$TMP; \
|
|
|
|
mv $$TMP ${DEPENDFILE}
|
1998-03-07 13:13:41 +00:00
|
|
|
.if !defined(NOEXTRADEPEND) && !defined(NOPIC)
|
1997-08-30 23:23:18 +00:00
|
|
|
.if ${BINFORMAT} == aout
|
1997-04-09 16:10:27 +00:00
|
|
|
echo lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: \
|
1997-05-04 21:30:40 +00:00
|
|
|
`${LDDESTDIRENV} ${CC} -shared -Wl,-f ${LDDESTDIR} ${LDADD}` \
|
|
|
|
>> ${DEPENDFILE}
|
1997-08-30 23:23:18 +00:00
|
|
|
.else
|
1997-12-17 13:36:44 +00:00
|
|
|
.if defined(DPADD) && !empty(DPADD)
|
1997-08-30 23:23:18 +00:00
|
|
|
echo lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: \
|
|
|
|
${DPADD} >> ${DEPENDFILE}
|
|
|
|
.endif
|
|
|
|
.endif
|
1997-08-05 03:49:49 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
.if !target(install)
|
|
|
|
.if !target(beforeinstall)
|
|
|
|
beforeinstall:
|
|
|
|
.endif
|
|
|
|
|
1994-08-26 18:58:10 +00:00
|
|
|
.if defined(PRECIOUSLIB)
|
|
|
|
SHLINSTALLFLAGS+= -fschg
|
|
|
|
.endif
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
realinstall: beforeinstall
|
1994-08-26 18:58:10 +00:00
|
|
|
.if !defined(INTERNALLIB)
|
1994-08-10 02:48:08 +00:00
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
|
|
${INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
|
1994-05-30 19:09:18 +00:00
|
|
|
.if !defined(NOPROFILE)
|
1994-08-04 21:09:27 +00:00
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
1994-08-10 02:48:08 +00:00
|
|
|
${INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
1994-08-26 18:58:10 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
.if !defined(NOPIC)
|
1997-08-30 23:23:18 +00:00
|
|
|
.if ${BINFORMAT} == aout
|
1994-08-04 21:09:27 +00:00
|
|
|
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR)
|
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
1994-08-26 18:58:10 +00:00
|
|
|
${INSTALLFLAGS} ${SHLINSTALLFLAGS} \
|
|
|
|
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
|
1994-11-14 04:55:39 +00:00
|
|
|
${DESTDIR}${SHLIBDIR}
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
1997-08-30 23:23:18 +00:00
|
|
|
.else
|
|
|
|
.if defined(SHLIB_MAJOR)
|
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
|
|
${INSTALLFLAGS} ${SHLINSTALLFLAGS} \
|
|
|
|
lib${LIB}.so.${SHLIB_MAJOR} \
|
|
|
|
${DESTDIR}${SHLIBDIR}
|
|
|
|
ln ${LN_FLAGS} -sf lib${LIB}.so.${SHLIB_MAJOR} \
|
|
|
|
${DESTDIR}${SHLIBDIR}/lib${LIB}.so
|
|
|
|
.endif
|
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
.if defined(INSTALL_PIC_ARCHIVE)
|
|
|
|
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
1994-08-10 02:48:08 +00:00
|
|
|
${INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${LIBDIR}
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
.if defined(LINKS) && !empty(LINKS)
|
|
|
|
@set ${LINKS}; \
|
|
|
|
while test $$# -ge 2; do \
|
|
|
|
l=${DESTDIR}$$1; \
|
|
|
|
shift; \
|
|
|
|
t=${DESTDIR}$$1; \
|
|
|
|
shift; \
|
1994-08-28 15:37:40 +00:00
|
|
|
${ECHO} $$t -\> $$l; \
|
1994-05-30 19:09:18 +00:00
|
|
|
rm -f $$t; \
|
1995-01-30 07:22:02 +00:00
|
|
|
ln ${LN_FLAGS} $$l $$t; \
|
1994-05-30 19:09:18 +00:00
|
|
|
done; true
|
|
|
|
.endif
|
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
install: afterinstall _SUBDIR
|
1994-05-30 19:09:18 +00:00
|
|
|
.if !defined(NOMAN)
|
1994-08-04 21:09:27 +00:00
|
|
|
afterinstall: realinstall maninstall
|
|
|
|
.else
|
|
|
|
afterinstall: realinstall
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
1998-03-12 20:02:17 +00:00
|
|
|
.if !target(regress)
|
|
|
|
regress:
|
|
|
|
.endif
|
|
|
|
|
1995-01-14 07:51:10 +00:00
|
|
|
DISTRIBUTION?= bin
|
1994-11-13 21:05:28 +00:00
|
|
|
.if !target(distribute)
|
1996-06-24 04:26:21 +00:00
|
|
|
distribute: _SUBDIR
|
1997-06-21 15:40:34 +00:00
|
|
|
.for dist in ${DISTRIBUTION}
|
|
|
|
cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${dist} SHARED=copies
|
|
|
|
.endfor
|
1994-11-13 21:05:28 +00:00
|
|
|
.endif
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.if !target(lint)
|
|
|
|
lint:
|
|
|
|
.endif
|
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.if !defined(NOMAN)
|
1994-05-30 19:09:18 +00:00
|
|
|
.include <bsd.man.mk>
|
1994-08-04 21:09:27 +00:00
|
|
|
.elif !target(maninstall)
|
|
|
|
maninstall:
|
1995-10-02 20:02:05 +00:00
|
|
|
all-man:
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
1998-03-06 08:08:36 +00:00
|
|
|
|
|
|
|
.if !exists(${DEPENDFILE})
|
|
|
|
${OBJS} ${POBJS} ${SOBJS}: ${SRCS:M*.h}
|
|
|
|
.endif
|
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
.include <bsd.obj.mk>
|