1994-08-04 21:09:27 +00:00
|
|
|
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-08-04 21:09:27 +00:00
|
|
|
#
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2002-04-17 13:49:29 +00:00
|
|
|
.include <bsd.init.mk>
|
1994-05-30 19:09:18 +00:00
|
|
|
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
# Set up the variables controlling shared libraries. After this section,
|
|
|
|
# SHLIB_NAME will be defined only if we are to create a shared library.
|
|
|
|
# SHLIB_LINK will be defined only if we are to create a link to it.
|
|
|
|
# INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive.
|
2004-12-21 09:33:47 +00:00
|
|
|
.if defined(NO_PIC)
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
.undef SHLIB_NAME
|
|
|
|
.undef INSTALL_PIC_ARCHIVE
|
|
|
|
.else
|
2004-05-07 09:58:36 +00:00
|
|
|
.if !defined(SHLIB) && defined(LIB)
|
|
|
|
SHLIB= ${LIB}
|
|
|
|
.endif
|
|
|
|
.if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR)
|
|
|
|
SHLIB_NAME= lib${SHLIB}.so.${SHLIB_MAJOR}
|
2002-07-18 17:44:20 +00:00
|
|
|
.endif
|
2004-01-27 23:22:15 +00:00
|
|
|
.if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*)
|
2002-07-18 17:44:20 +00:00
|
|
|
SHLIB_LINK?= ${SHLIB_NAME:R}
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
.endif
|
|
|
|
SONAME?= ${SHLIB_NAME}
|
1997-09-05 11:45:15 +00:00
|
|
|
.endif
|
|
|
|
|
2003-08-31 15:20:17 +00:00
|
|
|
.if defined(CRUNCH_CFLAGS)
|
2003-06-29 18:16:26 +00:00
|
|
|
CFLAGS+= ${CRUNCH_CFLAGS}
|
2003-08-31 15:20:17 +00:00
|
|
|
.endif
|
2003-06-29 18:16:26 +00:00
|
|
|
|
2006-09-11 05:35:57 +00:00
|
|
|
.if ${MK_ASSERT_DEBUG} == "no"
|
|
|
|
CFLAGS+= -DNDEBUG
|
2006-09-13 23:27:21 +00:00
|
|
|
NO_WERROR=
|
2006-09-11 05:35:57 +00:00
|
|
|
.endif
|
|
|
|
|
1994-09-16 14:30:25 +00:00
|
|
|
.if defined(DEBUG_FLAGS)
|
|
|
|
CFLAGS+= ${DEBUG_FLAGS}
|
2008-05-22 01:14:43 +00:00
|
|
|
|
2011-11-30 18:11:49 +00:00
|
|
|
.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
|
2008-05-22 01:14:43 +00:00
|
|
|
CTFFLAGS+= -g
|
|
|
|
.endif
|
2012-12-14 18:30:01 +00:00
|
|
|
.else
|
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
|
|
|
|
2013-06-07 21:40:02 +00:00
|
|
|
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
|
|
|
|
empty(DEBUG_FLAGS:M-gdwarf*)
|
2014-07-01 18:26:30 +00:00
|
|
|
SHARED_CFLAGS+= -g
|
|
|
|
SHARED_CXXFLAGS+= -g
|
2013-06-07 21:40:02 +00:00
|
|
|
CTFFLAGS+= -g
|
|
|
|
.endif
|
|
|
|
|
1996-09-28 06:01:01 +00:00
|
|
|
.include <bsd.libnames.mk>
|
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
|
1999-01-09 21:51:00 +00:00
|
|
|
# .So used for PIC object files
|
1994-05-30 19:09:18 +00:00
|
|
|
.SUFFIXES:
|
2011-04-17 21:03:23 +00:00
|
|
|
.SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .C .f .y .l .ln
|
2002-03-17 10:05:57 +00:00
|
|
|
|
2002-05-13 10:53:24 +00:00
|
|
|
.if !defined(PICFLAG)
|
2010-08-23 22:24:11 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "sparc64"
|
2002-05-13 10:53:24 +00:00
|
|
|
PICFLAG=-fPIC
|
|
|
|
.else
|
|
|
|
PICFLAG=-fpic
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
2004-03-12 21:36:12 +00:00
|
|
|
PO_FLAG=-pg
|
|
|
|
|
2011-11-21 16:35:57 +00:00
|
|
|
.c.o:
|
|
|
|
${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
2011-11-21 16:35:57 +00:00
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.c.po:
|
2011-11-21 16:35:57 +00:00
|
|
|
${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1999-01-09 21:51:00 +00:00
|
|
|
.c.So:
|
2011-11-21 16:35:57 +00:00
|
|
|
${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2012-06-09 11:41:29 +00:00
|
|
|
.cc.o .C.o .cpp.o .cxx.o:
|
2011-11-21 16:35:57 +00:00
|
|
|
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
|
|
|
|
1998-06-05 18:38:55 +00:00
|
|
|
.cc.po .C.po .cpp.po .cxx.po:
|
2011-11-21 16:35:57 +00:00
|
|
|
${CXX} ${PO_FLAG} ${STATIC_CXXFLAGS} ${PO_CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1999-01-09 21:51:00 +00:00
|
|
|
.cc.So .C.So .cpp.So .cxx.So:
|
2011-11-21 16:35:57 +00:00
|
|
|
${CXX} ${PICFLAG} -DPIC ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.f.po:
|
2004-03-15 17:01:31 +00:00
|
|
|
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1999-01-09 21:51:00 +00:00
|
|
|
.f.So:
|
1994-08-04 21:09:27 +00:00
|
|
|
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2003-07-02 17:03:28 +00:00
|
|
|
.s.po .s.So:
|
2003-07-02 12:41:04 +00:00
|
|
|
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2003-07-02 17:03:28 +00:00
|
|
|
.asm.po:
|
2011-01-07 14:32:29 +00:00
|
|
|
${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \
|
|
|
|
-c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
2003-07-02 17:03:28 +00:00
|
|
|
|
|
|
|
.asm.So:
|
2011-01-07 14:32:29 +00:00
|
|
|
${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
|
2003-07-02 17:03:28 +00:00
|
|
|
-c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
2003-07-02 17:03:28 +00:00
|
|
|
|
1994-08-04 21:09:27 +00:00
|
|
|
.S.po:
|
2011-01-07 14:32:29 +00:00
|
|
|
${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
1999-01-09 21:51:00 +00:00
|
|
|
.S.So:
|
2011-01-07 14:32:29 +00:00
|
|
|
${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
|
2011-11-29 16:34:44 +00:00
|
|
|
${CTFCONVERT_CMD}
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2012-08-22 19:25:57 +00:00
|
|
|
.if !defined(_SKIP_BUILD)
|
2013-03-04 21:36:34 +00:00
|
|
|
all: beforebuild .WAIT
|
|
|
|
beforebuild: objwarn
|
2012-08-22 19:25:57 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2013-09-08 09:40:23 +00:00
|
|
|
.if defined(PRIVATELIB)
|
|
|
|
_LIBDIR:=${LIBPRIVATEDIR}
|
|
|
|
_SHLIBDIR:=${LIBPRIVATEDIR}
|
|
|
|
.else
|
|
|
|
_LIBDIR:=${LIBDIR}
|
|
|
|
_SHLIBDIR:=${SHLIBDIR}
|
|
|
|
.endif
|
|
|
|
|
2013-02-20 20:42:56 +00:00
|
|
|
.if defined(SHLIB_NAME)
|
2013-06-07 21:40:02 +00:00
|
|
|
.if ${MK_DEBUG_FILES} != "no"
|
|
|
|
SHLIB_NAME_FULL=${SHLIB_NAME}.full
|
|
|
|
# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
|
2013-09-08 09:40:23 +00:00
|
|
|
.if ${_SHLIBDIR} == "/boot" ||\
|
2013-06-07 21:40:02 +00:00
|
|
|
${SHLIBDIR:C%/lib(/.*)?$%/lib%} == "/lib" ||\
|
|
|
|
${SHLIBDIR:C%/usr/lib(32)?(/.*)?%/usr/lib%} == "/usr/lib"
|
2013-09-08 09:40:23 +00:00
|
|
|
DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR}
|
2013-06-07 21:40:02 +00:00
|
|
|
.else
|
2013-09-08 09:40:23 +00:00
|
|
|
DEBUGFILEDIR=${_SHLIBDIR}/.debug
|
2013-06-07 21:40:02 +00:00
|
|
|
DEBUGMKDIR=
|
|
|
|
.endif
|
2013-02-20 20:42:56 +00:00
|
|
|
.else
|
|
|
|
SHLIB_NAME_FULL=${SHLIB_NAME}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2007-04-03 18:56:05 +00:00
|
|
|
.include <bsd.symver.mk>
|
2006-03-16 15:12:26 +00:00
|
|
|
|
2008-04-09 20:27:53 +00:00
|
|
|
# Allow libraries to specify their own version map or have it
|
2007-04-03 18:56:05 +00:00
|
|
|
# automatically generated (see bsd.symver.mk above).
|
2007-05-21 09:01:23 +00:00
|
|
|
.if ${MK_SYMVER} == "yes" && !empty(VERSION_MAP)
|
2013-02-20 20:42:56 +00:00
|
|
|
${SHLIB_NAME_FULL}: ${VERSION_MAP}
|
2006-03-16 15:12:26 +00:00
|
|
|
LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
|
|
|
|
.endif
|
|
|
|
|
2013-09-08 09:40:23 +00:00
|
|
|
.if defined(USEPRIVATELIB)
|
2014-08-06 22:17:26 +00:00
|
|
|
LDFLAGS+= -rpath ${LIBPRIVATEDIR}
|
2013-09-08 09:40:23 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-03 16:22:43 +00:00
|
|
|
.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
|
|
|
|
OBJS+= ${SRCS:N*.h:R:S/$/.o/}
|
2014-07-22 00:42:55 +00:00
|
|
|
NOPATH_FILES+= ${OBJS}
|
2002-07-03 16:22:43 +00:00
|
|
|
.endif
|
|
|
|
|
2002-05-13 10:53:24 +00:00
|
|
|
.if defined(LIB) && !empty(LIB)
|
|
|
|
_LIBS= lib${LIB}.a
|
2002-04-20 08:41:55 +00:00
|
|
|
|
2002-05-13 10:53:24 +00:00
|
|
|
lib${LIB}.a: ${OBJS} ${STATICOBJS}
|
|
|
|
@${ECHO} building static ${LIB} library
|
|
|
|
@rm -f ${.TARGET}
|
2006-10-25 09:43:38 +00:00
|
|
|
.if !defined(NM)
|
2012-12-06 01:31:25 +00:00
|
|
|
@${AR} ${ARFLAGS} ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
|
2006-10-25 09:43:38 +00:00
|
|
|
.else
|
2012-12-06 01:31:25 +00:00
|
|
|
@${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
|
2006-10-25 09:43:38 +00:00
|
|
|
.endif
|
2014-04-12 12:44:09 +00:00
|
|
|
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
|
2002-07-03 16:22:43 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2002-05-13 10:53:24 +00:00
|
|
|
.if !defined(INTERNALLIB)
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
|
2002-05-13 10:53:24 +00:00
|
|
|
_LIBS+= lib${LIB}_p.a
|
|
|
|
POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po}
|
2014-07-22 00:42:55 +00:00
|
|
|
NOPATH_FILES+= ${POBJS}
|
2002-05-13 10:53:24 +00:00
|
|
|
|
|
|
|
lib${LIB}_p.a: ${POBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building profiled ${LIB} library
|
2002-05-13 10:53:24 +00:00
|
|
|
@rm -f ${.TARGET}
|
2006-10-25 09:43:38 +00:00
|
|
|
.if !defined(NM)
|
2012-12-06 01:31:25 +00:00
|
|
|
@${AR} ${ARFLAGS} ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
|
2006-10-25 09:43:38 +00:00
|
|
|
.else
|
2012-12-06 01:31:25 +00:00
|
|
|
@${AR} ${ARFLAGS} ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
|
2006-10-25 09:43:38 +00:00
|
|
|
.endif
|
2014-04-12 12:44:09 +00:00
|
|
|
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
|
1994-10-25 17:55:25 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2002-07-03 16:22:43 +00:00
|
|
|
.if defined(SHLIB_NAME) || \
|
|
|
|
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
|
2002-05-13 10:53:24 +00:00
|
|
|
SOBJS+= ${OBJS:.o=.So}
|
2014-07-22 00:42:55 +00:00
|
|
|
NOPATH_FILES+= ${SOBJS}
|
2002-07-03 16:22:43 +00:00
|
|
|
.endif
|
2002-05-13 10:53:24 +00:00
|
|
|
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
.if defined(SHLIB_NAME)
|
2002-05-13 10:53:24 +00:00
|
|
|
_LIBS+= ${SHLIB_NAME}
|
|
|
|
|
2011-12-06 11:28:17 +00:00
|
|
|
SOLINKOPTS= -shared -Wl,-x
|
|
|
|
.if !defined(ALLOW_SHARED_TEXTREL)
|
|
|
|
SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel
|
|
|
|
.endif
|
|
|
|
|
2010-09-10 16:21:09 +00:00
|
|
|
.if target(beforelinking)
|
2012-12-31 21:54:43 +00:00
|
|
|
beforelinking: ${SOBJS}
|
|
|
|
${SHLIB_NAME_FULL}: beforelinking
|
2010-09-10 16:21:09 +00:00
|
|
|
.endif
|
2014-05-16 14:51:19 +00:00
|
|
|
|
|
|
|
.if defined(SHLIB_LINK)
|
|
|
|
# ${_SHLIBDIRPREFIX} and ${_LDSCRIPTROOT} are both needed when cross-building
|
|
|
|
# and when building 32 bits library shims. ${_SHLIBDIRPREFIX} is the directory
|
|
|
|
# prefix where shared objects will be installed by the install target.
|
|
|
|
#
|
|
|
|
# ${_LDSCRIPTROOT} is the directory prefix that will be used when generating
|
|
|
|
# ld(1) scripts. The crosstools' ld is configured to lookup libraries in an
|
|
|
|
# alternative directory which is called "sysroot", so during buildworld binaries
|
|
|
|
# won't be linked against the running system libraries but against the ones of
|
|
|
|
# the current source tree. ${_LDSCRIPTROOT} behavior is twisted because of
|
|
|
|
# the location where we store them:
|
|
|
|
# - 64 bits libs are located under sysroot, so ${_LDSCRIPTROOT} must be empty
|
|
|
|
# because ld(1) will manage to find them from sysroot;
|
|
|
|
# - 32 bits shims are not, so ${_LDSCRIPTROOT} is used to specify their full
|
|
|
|
# path, outside of sysroot.
|
|
|
|
# Note that ld(1) scripts are generated both during buildworld and
|
|
|
|
# installworld; in the later case ${_LDSCRIPTROOT} must be obviously empty
|
|
|
|
# because on the target system, libraries are meant to be looked up from /.
|
|
|
|
.if defined(SHLIB_LDSCRIPT) && !empty(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
|
|
|
|
${SHLIB_LINK:R}.ld: ${.CURDIR}/${SHLIB_LDSCRIPT}
|
|
|
|
sed -e 's,@@SHLIB@@,${_LDSCRIPTROOT}${_SHLIBDIR}/${SHLIB_NAME},g' \
|
|
|
|
-e 's,@@LIBDIR@@,${_LDSCRIPTROOT}${_LIBDIR},g' \
|
|
|
|
-e 's,/[^ ]*/,,g' \
|
|
|
|
${.ALLSRC} > ${.TARGET}
|
|
|
|
|
|
|
|
${SHLIB_NAME_FULL}: ${SHLIB_LINK:R}.ld
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2012-12-31 21:54:43 +00:00
|
|
|
${SHLIB_NAME_FULL}: ${SOBJS}
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
@${ECHO} building shared library ${SHLIB_NAME}
|
2012-12-15 00:03:35 +00:00
|
|
|
@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
|
2014-05-16 14:51:19 +00:00
|
|
|
.if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
|
2013-01-21 22:40:39 +00:00
|
|
|
@${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
.endif
|
2006-10-25 09:43:38 +00:00
|
|
|
.if !defined(NM)
|
2011-12-06 11:28:17 +00:00
|
|
|
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
|
2002-05-13 10:53:24 +00:00
|
|
|
-o ${.TARGET} -Wl,-soname,${SONAME} \
|
2006-10-25 09:43:38 +00:00
|
|
|
`lorder ${SOBJS} | tsort -q` ${LDADD}
|
|
|
|
.else
|
2011-12-06 11:28:17 +00:00
|
|
|
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
|
2006-10-25 09:43:38 +00:00
|
|
|
-o ${.TARGET} -Wl,-soname,${SONAME} \
|
|
|
|
`NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
|
|
|
|
.endif
|
2011-11-30 18:11:49 +00:00
|
|
|
.if ${MK_CTF} != "no"
|
2011-11-29 08:38:47 +00:00
|
|
|
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
|
|
|
|
.endif
|
2012-12-15 00:03:35 +00:00
|
|
|
|
2013-06-07 21:40:02 +00:00
|
|
|
.if ${MK_DEBUG_FILES} != "no"
|
|
|
|
CLEANFILES+= ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
|
|
|
|
${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug
|
|
|
|
${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \
|
2012-12-31 21:54:43 +00:00
|
|
|
${SHLIB_NAME_FULL} ${.TARGET}
|
2012-12-15 00:03:35 +00:00
|
|
|
|
2013-06-07 21:40:02 +00:00
|
|
|
${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL}
|
2012-12-31 21:54:43 +00:00
|
|
|
${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET}
|
2012-12-15 00:03:35 +00:00
|
|
|
.endif
|
2013-03-28 04:13:52 +00:00
|
|
|
.endif #defined(SHLIB_NAME)
|
1994-08-04 21:09:27 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"
|
2002-05-13 10:53:24 +00:00
|
|
|
_LIBS+= lib${LIB}_pic.a
|
|
|
|
|
|
|
|
lib${LIB}_pic.a: ${SOBJS}
|
1994-08-28 15:37:40 +00:00
|
|
|
@${ECHO} building special pic ${LIB} library
|
2002-05-13 10:53:24 +00:00
|
|
|
@rm -f ${.TARGET}
|
2012-12-06 01:31:25 +00:00
|
|
|
@${AR} ${ARFLAGS} ${.TARGET} ${SOBJS} ${ARADD}
|
2014-04-12 12:44:09 +00:00
|
|
|
${RANLIB} ${RANLIBFLAGS} ${.TARGET}
|
1994-10-25 17:55:25 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2004-12-21 09:33:47 +00:00
|
|
|
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
|
2002-05-13 10:53:24 +00:00
|
|
|
LINTLIB= llib-l${LIB}.ln
|
|
|
|
_LIBS+= ${LINTLIB}
|
|
|
|
LINTOBJS+= ${SRCS:M*.c:.c=.ln}
|
2014-07-22 00:42:55 +00:00
|
|
|
NOPATH_FILES+= ${LINTOBJS}
|
2002-05-13 10:53:24 +00:00
|
|
|
|
2002-03-17 10:05:57 +00:00
|
|
|
${LINTLIB}: ${LINTOBJS}
|
2002-05-13 10:53:24 +00:00
|
|
|
@${ECHO} building lint library ${.TARGET}
|
|
|
|
@rm -f ${.TARGET}
|
2002-03-17 10:05:57 +00:00
|
|
|
${LINT} ${LINTLIBFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
|
1996-06-17 15:59:52 +00:00
|
|
|
.endif
|
2002-05-13 10:53:24 +00:00
|
|
|
|
2005-04-11 07:13:29 +00:00
|
|
|
.endif # !defined(INTERNALLIB)
|
2002-05-13 10:53:24 +00:00
|
|
|
|
2012-08-22 19:25:57 +00:00
|
|
|
.if defined(_SKIP_BUILD)
|
|
|
|
all:
|
|
|
|
.else
|
2002-05-13 10:53:24 +00:00
|
|
|
all: ${_LIBS}
|
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_MAN} != "no"
|
2002-05-13 10:53:24 +00:00
|
|
|
all: _manpages
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
2012-08-22 19:25:57 +00:00
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
1998-03-07 13:13:41 +00:00
|
|
|
_EXTRADEPEND:
|
1997-04-09 16:10:27 +00:00
|
|
|
@TMP=_depend$$$$; \
|
1999-01-09 21:51:00 +00:00
|
|
|
sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.So:/' < ${DEPENDFILE} \
|
1997-04-09 16:10:27 +00:00
|
|
|
> $$TMP; \
|
|
|
|
mv $$TMP ${DEPENDFILE}
|
2004-12-21 09:42:10 +00:00
|
|
|
.if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME)
|
1997-12-17 13:36:44 +00:00
|
|
|
.if defined(DPADD) && !empty(DPADD)
|
Add some capabilities to <bsd.lib.mk> so that it can be used for
building dlopen-able modules, and add features needed to build a
static PAM library. I think I cleaned it up some, too, but beauty
is in the eye of the beholder.
You can now build a shared library without version numbers, by
defining SHLIB_NAME to something like "pam_unix.so". If SHLIB_MAJOR
and/or SHLIB_MINOR are set, SHLIB_NAME gets the usual default value,
but it can be overridden if desired. If none of these symbols are
set, no shared library is built.
SHLIB_LINK controls the name of the symbolic link that points to
the library. If it is unset, no link is made. In the usual case,
it gets the right default: e.g., "libc.so" for ELF, nothing for
a.out. This can be overridden.
STATICOBJS can be set to a list of extra object files that should
be added to the static library but not to the shared library.
These objects are added to the profiled library too.
These changes should make it easy to use <bsd.lib.mk> for building
things such as PAM modules and dynamic linkers, for which <bsd.prog.mk>
has been abused until now.
1999-01-20 21:42:40 +00:00
|
|
|
echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE}
|
1997-08-30 23:23:18 +00:00
|
|
|
.endif
|
|
|
|
.endif
|
1994-05-30 19:09:18 +00:00
|
|
|
|
|
|
|
.if !target(install)
|
|
|
|
|
2004-10-01 07:57:02 +00:00
|
|
|
.if defined(PRECIOUSLIB)
|
2004-12-21 09:53:14 +00:00
|
|
|
.if !defined(NO_FSCHG)
|
1994-08-26 18:58:10 +00:00
|
|
|
SHLINSTALLFLAGS+= -fschg
|
|
|
|
.endif
|
2004-10-01 07:57:02 +00:00
|
|
|
SHLINSTALLFLAGS+= -S
|
|
|
|
.endif
|
1994-08-26 18:58:10 +00:00
|
|
|
|
1999-07-31 20:27:33 +00:00
|
|
|
_INSTALLFLAGS:= ${INSTALLFLAGS}
|
|
|
|
.for ie in ${INSTALLFLAGS_EDIT}
|
|
|
|
_INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
|
|
|
|
.endfor
|
2000-02-03 09:36:17 +00:00
|
|
|
_SHLINSTALLFLAGS:= ${SHLINSTALLFLAGS}
|
1999-07-31 20:27:33 +00:00
|
|
|
.for ie in ${INSTALLFLAGS_EDIT}
|
|
|
|
_SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}}
|
|
|
|
.endfor
|
|
|
|
|
2002-07-03 16:22:43 +00:00
|
|
|
.if !defined(INTERNALLIB)
|
2002-04-23 09:03:56 +00:00
|
|
|
realinstall: _libinstall
|
2002-07-03 12:28:03 +00:00
|
|
|
.ORDER: beforeinstall _libinstall
|
2002-04-23 09:03:56 +00:00
|
|
|
_libinstall:
|
2014-08-06 22:17:26 +00:00
|
|
|
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no" && !defined(PRIVATELIB)
|
2002-03-22 20:28:16 +00:00
|
|
|
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2013-09-08 09:40:23 +00:00
|
|
|
${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${_LIBDIR}
|
2002-05-13 10:53:24 +00:00
|
|
|
.endif
|
2014-08-06 22:17:26 +00:00
|
|
|
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(PRIVATELIB)
|
2002-03-22 20:28:16 +00:00
|
|
|
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2013-09-08 09:40:23 +00:00
|
|
|
${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${_LIBDIR}
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
2003-06-10 04:47:49 +00:00
|
|
|
.if defined(SHLIB_NAME)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
1999-07-31 20:27:33 +00:00
|
|
|
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
|
2013-09-08 09:40:23 +00:00
|
|
|
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}
|
2013-06-07 21:40:02 +00:00
|
|
|
.if ${MK_DEBUG_FILES} != "no"
|
|
|
|
.if defined(DEBUGMKDIR)
|
|
|
|
${INSTALL} -T debug -d ${DESTDIR}${DEBUGFILEDIR}
|
|
|
|
.endif
|
|
|
|
${INSTALL} -T debug -o ${LIBOWN} -g ${LIBGRP} -m ${DEBUGMODE} \
|
2012-12-18 21:13:03 +00:00
|
|
|
${_INSTALLFLAGS} \
|
2013-06-07 21:40:02 +00:00
|
|
|
${SHLIB_NAME}.debug ${DESTDIR}${DEBUGFILEDIR}
|
2012-12-15 00:03:35 +00:00
|
|
|
.endif
|
2014-08-06 22:17:26 +00:00
|
|
|
.if defined(SHLIB_LINK) && !defined(PRIVATELIB)
|
2014-05-16 14:51:19 +00:00
|
|
|
.if commands(${SHLIB_LINK:R}.ld)
|
2012-05-07 09:00:30 +00:00
|
|
|
${INSTALL} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2014-05-16 14:51:19 +00:00
|
|
|
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
|
2013-09-08 09:40:23 +00:00
|
|
|
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
2012-05-07 09:00:30 +00:00
|
|
|
.else
|
2013-09-08 09:40:23 +00:00
|
|
|
.if ${_SHLIBDIR} == ${_LIBDIR}
|
|
|
|
${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
2003-09-07 14:15:40 +00:00
|
|
|
.else
|
2013-09-08 09:40:23 +00:00
|
|
|
${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${_SHLIBDIR}/${SHLIB_NAME} \
|
|
|
|
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
|
|
|
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
|
|
|
|
-chflags noschg ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
|
|
|
|
rm -f ${DESTDIR}${_LIBDIR}/${SHLIB_NAME}
|
2003-09-07 14:15:40 +00:00
|
|
|
.endif
|
2003-09-04 04:29:11 +00:00
|
|
|
.endif
|
2012-05-07 09:00:30 +00:00
|
|
|
.endif # SHLIB_LDSCRIPT
|
|
|
|
.endif # SHLIB_LINK
|
|
|
|
.endif # SHIB_NAME
|
2014-08-06 22:17:26 +00:00
|
|
|
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" && !defined(PRIVATELIB)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2013-09-08 09:40:23 +00:00
|
|
|
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}
|
1994-08-04 21:09:27 +00:00
|
|
|
.endif
|
2004-12-21 09:33:47 +00:00
|
|
|
.if defined(WANT_LINT) && !defined(NO_LINT) && defined(LIB) && !empty(LIB)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2002-05-12 16:01:00 +00:00
|
|
|
${_INSTALLFLAGS} ${LINTLIB} ${DESTDIR}${LINTLIBDIR}
|
|
|
|
.endif
|
2005-04-11 07:13:29 +00:00
|
|
|
.endif # !defined(INTERNALLIB)
|
2002-05-12 16:01:00 +00:00
|
|
|
|
2013-01-17 17:27:10 +00:00
|
|
|
.if !defined(LIBRARIES_ONLY)
|
2005-02-08 10:37:34 +00:00
|
|
|
.include <bsd.nls.mk>
|
2002-06-03 14:49:34 +00:00
|
|
|
.include <bsd.files.mk>
|
2002-05-15 16:19:54 +00:00
|
|
|
.include <bsd.incs.mk>
|
2013-01-17 17:27:10 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-02 12:16:54 +00:00
|
|
|
.include <bsd.links.mk>
|
1994-05-30 19:09:18 +00:00
|
|
|
|
2013-01-24 15:55:24 +00:00
|
|
|
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
2002-05-07 15:42:56 +00:00
|
|
|
realinstall: _maninstall
|
2002-07-03 12:28:03 +00:00
|
|
|
.ORDER: beforeinstall _maninstall
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
2002-05-07 15:27:56 +00:00
|
|
|
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !target(lint)
|
2002-04-23 09:03:56 +00:00
|
|
|
lint: ${SRCS:M*.c}
|
2002-09-20 19:32:51 +00:00
|
|
|
${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
|
1994-05-30 19:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
2013-01-17 17:27:10 +00:00
|
|
|
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
1994-05-30 19:09:18 +00:00
|
|
|
.include <bsd.man.mk>
|
2001-03-27 08:43:28 +00:00
|
|
|
.endif
|
1994-08-04 21:09:27 +00:00
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
1998-03-06 08:08:36 +00:00
|
|
|
|
2002-04-07 14:58:12 +00:00
|
|
|
.if !exists(${.OBJDIR}/${DEPENDFILE})
|
2002-07-03 16:22:43 +00:00
|
|
|
.if defined(LIB) && !empty(LIB)
|
|
|
|
${OBJS} ${STATICOBJS} ${POBJS}: ${SRCS:M*.h}
|
2004-01-17 18:51:55 +00:00
|
|
|
.for _S in ${SRCS:N*.[hly]}
|
|
|
|
${_S:R}.po: ${_S}
|
|
|
|
.endfor
|
2002-07-03 16:22:43 +00:00
|
|
|
.endif
|
|
|
|
.if defined(SHLIB_NAME) || \
|
|
|
|
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
|
|
|
|
${SOBJS}: ${SRCS:M*.h}
|
2004-01-17 18:51:55 +00:00
|
|
|
.for _S in ${SRCS:N*.[hly]}
|
|
|
|
${_S:R}.So: ${_S}
|
|
|
|
.endfor
|
1998-03-06 08:08:36 +00:00
|
|
|
.endif
|
2002-05-13 10:53:24 +00:00
|
|
|
.endif
|
1998-03-06 08:08:36 +00:00
|
|
|
|
2002-07-21 21:22:45 +00:00
|
|
|
.if !target(clean)
|
|
|
|
clean:
|
|
|
|
.if defined(CLEANFILES) && !empty(CLEANFILES)
|
|
|
|
rm -f ${CLEANFILES}
|
|
|
|
.endif
|
|
|
|
.if defined(LIB) && !empty(LIB)
|
|
|
|
rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS}
|
|
|
|
.endif
|
|
|
|
.if !defined(INTERNALLIB)
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
|
2002-07-21 21:22:45 +00:00
|
|
|
rm -f ${POBJS} ${POBJS:S/$/.tmp/}
|
|
|
|
.endif
|
|
|
|
.if defined(SHLIB_NAME) || \
|
|
|
|
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
|
|
|
|
rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/}
|
|
|
|
.endif
|
|
|
|
.if defined(SHLIB_NAME)
|
|
|
|
.if defined(SHLIB_LINK)
|
2012-05-07 09:00:30 +00:00
|
|
|
.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
|
|
|
|
rm -f lib${LIB}.ld
|
|
|
|
.endif
|
2002-07-21 21:22:45 +00:00
|
|
|
rm -f ${SHLIB_LINK}
|
|
|
|
.endif
|
2013-03-28 04:13:52 +00:00
|
|
|
.endif # defined(SHLIB_NAME)
|
2002-07-21 21:22:45 +00:00
|
|
|
.if defined(WANT_LINT) && defined(LIB) && !empty(LIB)
|
|
|
|
rm -f ${LINTOBJS}
|
|
|
|
.endif
|
2005-04-11 07:13:29 +00:00
|
|
|
.endif # !defined(INTERNALLIB)
|
2002-07-21 21:22:45 +00:00
|
|
|
.if defined(_LIBS) && !empty(_LIBS)
|
|
|
|
rm -f ${_LIBS}
|
|
|
|
.endif
|
|
|
|
.if defined(CLEANDIRS) && !empty(CLEANDIRS)
|
|
|
|
rm -rf ${CLEANDIRS}
|
|
|
|
.endif
|
2006-03-23 20:37:04 +00:00
|
|
|
.if !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
|
|
|
|
rm -f ${VERSION_MAP}
|
|
|
|
.endif
|
2002-07-21 21:22:45 +00:00
|
|
|
.endif
|
|
|
|
|
2014-07-22 00:42:55 +00:00
|
|
|
.if !empty(_LIBS)
|
|
|
|
NOPATH_FILES+= ${_LIBS}
|
|
|
|
.endif
|
|
|
|
|
1996-06-24 04:26:21 +00:00
|
|
|
.include <bsd.obj.mk>
|
2001-05-19 23:18:21 +00:00
|
|
|
|
|
|
|
.include <bsd.sys.mk>
|