minix/share/mk/bsd.shlib.mk
Ben Gras 4b999f1962 build shared versions of libraries
building defaults to off until clang is updated.

current clang does not handle -shared, necessary to change the ld
invocation to build shared libraries properly. a new clang should be
installed and MKPIC defaults to no unless the newer clang is detected.

changes:

	. mainly small imports of a Makefile or two and small fixes
	  (turning things back on that were turned off in Makefiles)
	. e.g.: dynamic librefuse now depends on dynamic
	  libpuffs, so libpuffs has to be built dynamically too
	  and a make dependency barrier is needed in lib/Makefile
	. all library objects now have a PIC (for .so) and non-PIC
	  version, so everything is built twice.
	. generate PIC versions of the compat (un-RENAMEd) jump files,
	  include function type annotation in generated assembly
	. build progs with -static by default for now
	. also build ld.elf_so
	. also import NetBSD ldd
2012-04-16 05:21:20 +02:00

40 lines
833 B
Makefile

# $NetBSD: bsd.shlib.mk,v 1.6 2007/08/29 21:34:17 hira Exp $
.if !defined(_BSD_SHLIB_MK_)
_BSD_SHLIB_MK_=1
.if ${MKDYNAMICROOT} == "no"
SHLIBINSTALLDIR?= /usr/lib
.else
SHLIBINSTALLDIR?= /lib
.endif
.if ${MKDYNAMICROOT} == "no" || \
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
${BINDIR:Ux} != "/libexec" && ${USE_SHLIBDIR:Uno} == "no")
SHLIBDIR?= /usr/lib
.else
SHLIBDIR?= /lib
.endif
.if ${USE_SHLIBDIR:Uno} != "no"
_LIBSODIR?= ${SHLIBINSTALLDIR}
.else
_LIBSODIR?= ${LIBDIR}
.endif
.if ${MKDYNAMICROOT} == "no"
SHLINKINSTALLDIR?= /usr/libexec
.else
SHLINKINSTALLDIR?= /libexec
.endif
.if ${MKDYNAMICROOT} == "no" || \
(${BINDIR:Ux} != "/bin" && ${BINDIR:Ux} != "/sbin" && \
${BINDIR:Ux} != "/libexec")
SHLINKDIR?= /usr/libexec
.else
SHLINKDIR?= /libexec
.endif
.endif # !defined(_BSD_SHLIB_MK_)