minix/usr.bin/ldd/Makefile
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

44 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.15 2009/12/15 04:06:43 mrg Exp $
WARNS?= 3 # XXX: -Wsign-compare issues ld.elf_so source
.include <bsd.own.mk> # for MKDYNAMICROOT definition
PROG= ldd
SRCS= ldd.c
MAN= ldd.1
SUBDIR+= elf32 elf64 elf32_compat
.if (${MACHINE_ARCH} != "alpha")
LIB_ELF32DIR!= cd ${.CURDIR}/elf32 && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_ELF32DIR}/libldd_elf32.a
.endif
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
LIB_ELF32COMPATDIR!= cd ${.CURDIR}/elf32_compat && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
.endif
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
(${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
(${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
LIB_ELF64DIR!= cd ${.CURDIR}/elf64 && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_ELF64DIR}/libldd_elf64.a
CPPFLAGS.ldd.c= -DELFSIZE=64
.else
CPPFLAGS.ldd.c= -DELFSIZE=32
.endif
LDADD+= ${EXTRA_LIBS}
DPADD+= ${EXTRA_LIBS}
.include "Makefile.common"
.if (${MKDYNAMICROOT} == "no")
LDSTATIC?= -static
.endif
.include <bsd.prog.mk>
.include <bsd.subdir.mk>