freebsd-nq/secure/usr.bin/scp/Makefile
Baptiste Daroussin d029c3aa25 Rework privatelib/internallib
Make sure everything linking to a privatelib and/or an internallib does it directly
from the OBJDIR rather than DESTDIR.
Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing
in final installation
Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to
internal/privatelib
Directly link to the .so in case of private library to avoid having to complexify
LDFLAGS.

Phabric:	https://phabric.freebsd.org/D553
Reviewed by:	imp, emaste
2014-08-06 22:17:26 +00:00

33 lines
527 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
PROG= scp
SRCS= scp.c
CFLAGS+=-I${SSHDIR} -include ssh_namespace.h
.if !defined(NO_SHARED)
# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
.endif
DPADD= ${LIBSSH}
LDADD= ${LDSSH}
USEPRIVATELIB= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
#USEPRIVATELIB+= ldns
.endif
DPADD+= ${LIBCRYPT} ${LIBCRYPTO} ${LIBZ}
LDADD+= -lcrypt -lcrypto -lz
.include <bsd.prog.mk>
.PATH: ${SSHDIR}
${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h