From 32e5044debc19eeec85e0a957e2adcd415b48346 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:26:38 +0000 Subject: [PATCH] Convert mt(1) and libmt to LIBADD While here fix missing link to libbsdxml for libmt Fix overlinking in mt(1) Make add an indirect libmt dependency on bsdxml to allow static linking if needed --- lib/libmt/Makefile | 3 +-- share/mk/src.libnames.mk | 5 +++++ usr.bin/mt/Makefile | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/libmt/Makefile b/lib/libmt/Makefile index fe54d2fe80bd..6fe59201a87f 100644 --- a/lib/libmt/Makefile +++ b/lib/libmt/Makefile @@ -5,8 +5,7 @@ SHLIBDIR?= /lib SRCS= mtlib.c INCS= mtlib.h -DPADD= ${LIBSBUF} -LDADD= -lsbuf +LIBADD= sbuf bsdxml MAN= mt.3 diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 75c90a0a6d77..d6a9ba29ac4e 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -111,6 +111,7 @@ _LIBRARIES= \ md \ memstat \ mp \ + mt \ nandfs \ ncurses \ ncursesw \ @@ -199,6 +200,7 @@ _DP_proc+= ctf _DP_mp= crypto _DP_memstat= kvm _DP_magic= z +_DP_mt= bsdxml _DP_ldns= crypto .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto @@ -259,6 +261,9 @@ LDADD_atf_cxx+= ${LDADD_atf_c} DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} +DPADD_mt+= ${DPADD_sbuf} +LDADD_mt+= ${LDADD_sbuf} + # The following depends on libraries which are using pthread DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} diff --git a/usr.bin/mt/Makefile b/usr.bin/mt/Makefile index 802eed18ec19..b71c2f8ea69c 100644 --- a/usr.bin/mt/Makefile +++ b/usr.bin/mt/Makefile @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= mt -DPADD= ${LIBMT} ${LIBSBUF} ${LIBBSDXML} -LDADD= -lmt -lsbuf -lbsdxml +LIBADD= mt .include