LIBPRIV: Add common PRIVATELIB_LDFLAGS definitions.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 9 Nov 2016 17:14:52 +0000 (19:14 +0200)
committerzrj <zrj@dragonflybsd.org>
Thu, 10 Nov 2016 14:09:42 +0000 (16:09 +0200)
Simply being able to change it in two places is easier than everywhere.
Also add PRIVATELIB_BLDFLAGS that is intended for bootsrapping only.
While there, perform some cleanup for dup entries.

103 files changed:
Makefile.ssh.common
bin/csh/Makefile
bin/ed/Makefile
bin/ls/Makefile
bin/sh/Makefile
games/atc/Makefile
games/backgammon/backgammon/Makefile
games/backgammon/teachgammon/Makefile
games/battlestar/Makefile
games/bs/Makefile
games/canfield/canfield/Makefile
games/colorbars/Makefile
games/cribbage/Makefile
games/factor/Makefile
games/grdc/Makefile
games/hack/Makefile
games/hangman/Makefile
games/hunt/hunt/Makefile
games/larn/Makefile
games/mille/Makefile
games/phantasia/Makefile
games/rain/Makefile
games/robots/Makefile
games/rogue/Makefile
games/sail/Makefile
games/snake/snake/Makefile
games/worm/Makefile
games/worms/Makefile
gnu/sbin/cryptsetup/Makefile
gnu/sbin/lvm/Makefile
gnu/usr.bin/dialog/Makefile
gnu/usr.bin/gdb/gdb/Makefile
gnu/usr.bin/gdb/kgdb/Makefile
gnu/usr.bin/gdb/libgdb/Makefile
lib/libarchive/Makefile
lib/libedit/libedit/Makefile
lib/libfetch/Makefile
lib/libopie/Makefile
lib/libradius/Makefile
lib/libressl/Makefile
lib/pam_module/pam_ssh/Makefile
libexec/dma/dma/Makefile
libexec/telnetd/Makefile
sbin/cryptdisks/Makefile
sbin/fsdb/Makefile
sbin/hammer/Makefile
sbin/hammer2/Makefile
sbin/init/Makefile
sbin/iscontrol/Makefile
sbin/md5/Makefile
sbin/ping6/Makefile
sbin/tcplay/Makefile
sbin/vinum/Makefile
share/initrd/bin/Makefile
share/initrd/sbin.libcrypto/Makefile
share/initrd/sbin.lvm/Makefile
share/initrd/sbin/Makefile
share/mk/bsd.lib.mk
share/mk/bsd.prog.mk
tools/tools/crypto/Makefile
tools/tools/net80211/stumbler/Makefile
tools/tools/net80211/w00t/Makefile.inc
usr.bin/bc/Makefile
usr.bin/bdes/Makefile
usr.bin/chkey/Makefile
usr.bin/dc/Makefile
usr.bin/drill/Makefile
usr.bin/ee/Makefile
usr.bin/fetch/Makefile
usr.bin/ftp/Makefile
usr.bin/less/Makefile
usr.bin/msgs/Makefile
usr.bin/nc/Makefile
usr.bin/ncal/Makefile
usr.bin/newkey/Makefile
usr.bin/openssl/Makefile
usr.bin/sftp/Makefile
usr.bin/systat/Makefile
usr.bin/tabs/Makefile
usr.bin/talk/Makefile
usr.bin/telnet/Makefile
usr.bin/tftp/Makefile
usr.bin/tic/Makefile
usr.bin/top/Makefile
usr.bin/tput/Makefile
usr.bin/tset/Makefile
usr.bin/ul/Makefile
usr.bin/units/Makefile
usr.bin/vi/Makefile
usr.bin/window/Makefile
usr.sbin/802_11/Makefile.crypto
usr.sbin/802_11/wpa_cli/Makefile
usr.sbin/cdcontrol/Makefile
usr.sbin/installer/dfuife_curses/Makefile
usr.sbin/keyserv/Makefile
usr.sbin/lpr/lpc/Makefile
usr.sbin/mtree/Makefile
usr.sbin/ppp/Makefile
usr.sbin/pppctl/Makefile
usr.sbin/pppd/Makefile
usr.sbin/tcpdump/Makefile
usr.sbin/tzsetup/Makefile
usr.sbin/watch/Makefile

index 165147e..57fa440 100644 (file)
@@ -21,7 +21,7 @@ CFLAGS+=      -I${SSHC_SYSDIR}/lib/libssh -I${SSHDIR}
 .if ${.CURDIR:T} != "libssh"
 DPADD+=                ${LIBSSH} ${LIBRECRYPTO} ${LIBUTIL} ${LIBZ} ${LIBPTHREAD}
 LDADD+=                -lprivate_ssh -lprivate_crypto -lutil -lz -lpthread
-LDFLAGS+=      -rpath /lib/priv:/usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
 .endif
 
 .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
index 6863fdd..1095066 100644 (file)
@@ -44,17 +44,17 @@ LDADD=      -ltermcap -lcrypt
 .  if exists(/usr/lib/priv/libprivate_crypto.a)
 DPADD= ${LIBNCURSES} ${LIBCRYPT} ${LIBRECRYPTO}
 LDADD= -lprivate_ncurses -lcrypt -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L /usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_BLDFLAGS}
 .  else
 DPADD= ${LIBNCURSES} ${LIBCRYPT} ${LIBRECRYPTO}
 LDADD= -lprivate_ncurses -lcrypt -lcrypto
-LDFLAGS+=      -rpath /lib/priv -L /usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_BLDFLAGS}
 .  endif
 .  endif
 .else
 DPADD= ${LIBNCURSES} ${LIBCRYPT} ${LIBRECRYPTO}
 LDADD= -lprivate_ncurses -lcrypt -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 .if defined(BOOTSTRAPPING)
index 541a13c..6fc278a 100644 (file)
@@ -10,7 +10,7 @@ MLINKS=       ed.1 red.1
 CFLAGS+=       -DDES -I${.CURDIR}/../../crypto/libressl/include
 DPADD=         ${LIBRECRYPTO}
 LDADD=         -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 .include <bsd.prog.mk>
index b676397..ea60958 100644 (file)
@@ -6,7 +6,7 @@ SRCS=   cmp.c ls.c print.c util.c
 
 DPADD= ${LIBUTIL} ${LIBNCURSES}
 LDADD= -lutil -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CFLAGS+= -DCOLORLS
 
index 4668061..597e008 100644 (file)
@@ -37,7 +37,7 @@ LDADD= -lprivate_edit
 .  else
 DPADD= ${LIBEDIT}
 LDADD= -lprivate_edit
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_BLDFLAGS}
 .  endif
 .  if exists(/usr/lib/libtermcap.a)
 DPADD+= /usr/lib/libtermcap.a
@@ -45,12 +45,12 @@ LDADD+= -ltermcap
 .  else
 DPADD+= ${LIBNCURSES}
 LDADD+= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L /usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_BLDFLAGS}
 .  endif
 .else
 DPADD= ${LIBEDIT} ${LIBNCURSES}
 LDADD= -lprivate_edit -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 
index b468b20..5a9f5c1 100644 (file)
@@ -8,7 +8,7 @@ SRCS=   extern.c grammar.y graphics.c input.c lex.l list.c log.c \
 MAN=   atc.6
 DPADD= ${LIBL} ${LIBM} ${LIBNCURSES}
 LDADD= -ll -lm -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 FILES=  Game_List Killer crossover default easy game_2
 FILESDIR=      ${SHAREDIR}/games/atc
 HIDEGAME=hidegame
index 9243d3b..58a03a9 100644 (file)
@@ -8,7 +8,7 @@ SRCS=   allow.c board.c check.c extra.c fancy.c init.c main.c move.c \
 MAN=   backgammon.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .PATH: ${.CURDIR}/../common_source
 HIDEGAME=hidegame
 
index 9eae765..f8459b8 100644 (file)
@@ -6,7 +6,7 @@ SRCS=   allow.c board.c check.c data.c fancy.c init.c odds.c one.c save.c \
        subs.c table.c teach.c ttext1.c ttext2.c tutor.c
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 NOMAN= noman
 
index bc134a7..63e9015 100644 (file)
@@ -10,7 +10,7 @@ MAN=  battlestar.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
 HIDEGAME=hidegame
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 beforeinstall:
 .if !exists(${DESTDIR}/var/games/battlestar.log)
        ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 664 /dev/null \
index 0e98585..7818479 100644 (file)
@@ -4,7 +4,7 @@ PROG=   bs
 MAN=   bs.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 
 .include <bsd.prog.mk>
index 16aa6e3..cdc64e5 100644 (file)
@@ -5,7 +5,7 @@ PROG=   canfield
 MAN=   canfield.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 MLINKS=        canfield.6 cfscores.6
 
index 1df1e58..09f7601 100644 (file)
@@ -4,6 +4,6 @@ PROG=  colorbars
 MAN=   colorbars.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 7a80f03..5e9105d 100644 (file)
@@ -4,7 +4,7 @@
 PROG=  cribbage
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 SRCS=  extern.c crib.c cards.c instr.c io.c score.c support.c
 FILES= cribbage.n
 FILESNAME_cribbage.n=  cribbage.instr
index f6fbe2b..5263908 100644 (file)
@@ -9,7 +9,7 @@ CFLAGS+=-I${.CURDIR}/../primes
 CFLAGS+=       -DHAVE_OPENSSL -I${.CURDIR}/../../crypto/libressl/include
 LDADD=         -lprivate_crypto
 DPADD=         ${LIBRECRYPTO}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 MAN=   factor.6
index 3069a31..e090390 100644 (file)
@@ -4,6 +4,6 @@ PROG=   grdc
 MAN=   grdc.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index f6a1ccd..1f7bc4b 100644 (file)
@@ -17,7 +17,7 @@ SRCS= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
 MAN=   hack.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+= -I${.CURDIR} -I.
 FILES= rumors help hh data
 FILESMODE_rumors=      440
index 0167997..108fdf6 100644 (file)
@@ -6,6 +6,6 @@ SRCS=   endgame.c extern.c getguess.c getsym.c getword.c main.c playgame.c \
 MAN=   hangman.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 1a1be87..14467ad 100644 (file)
@@ -6,7 +6,7 @@ SRCS=   connect.c hunt.c otto.c playit.c display.c list.c
 MAN=   hunt.6
 LDADD= -lprivate_ncurses
 DPADD= ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CFLAGS+=-I${.CURDIR}/../huntd
 
index a70469f..e279328 100644 (file)
@@ -50,7 +50,7 @@ SRCS= main.c object.c create.c tok.c display.c global.c data.c io.c \
        signal.c moreobj.c movem.c regen.c fortune.c savelev.c
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 FILES= larnmaze larnopts larn.help
 FILESDIR=      ${SHAREDIR}/games/larn
 HIDEGAME=hidegame
index f658648..53ca455 100644 (file)
@@ -6,7 +6,7 @@ SRCS=   comp.c end.c extern.c init.c mille.c misc.c move.c print.c \
        roll.c save.c types.c varpush.c
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 MAN=   mille.6
 HIDEGAME=hidegame
 
index 9ecc1c5..e485433 100644 (file)
@@ -5,7 +5,7 @@ PROG=   phantasia
 SRCS=  main.c fight.c io.c interplayer.c gamesupport.c misc.c phantglobs.c
 DPADD= ${LIBM} ${LIBNCURSES}
 LDADD= -lm -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 NXLDLIBS= -lm
 DATAFILES=characs gold lastdead mess monsters motd scoreboard void
 HIDEGAME=hidegame
index a640a28..a0f2b9e 100644 (file)
@@ -5,6 +5,6 @@ PROG=   rain
 MAN=   rain.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index f59bc93..29546ff 100644 (file)
@@ -8,7 +8,7 @@ SRCS=   extern.c init_field.c main.c make_level.c move.c move_robs.c \
 MAN=   robots.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 
 beforeinstall:
index 3d7afea..26b9f3b 100644 (file)
@@ -8,7 +8,7 @@ SRCS=   hit.c init.c inventory.c level.c machdep.c main.c \
        room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 MAN=   rogue.6
 
index 1352330..6669634 100644 (file)
@@ -8,7 +8,7 @@ SRCS=   main.c pl_main.c pl_1.c pl_2.c pl_3.c pl_4.c pl_5.c pl_6.c pl_7.c \
 MAN=   sail.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 
 beforeinstall:
index 440b9f3..0cee869 100644 (file)
@@ -6,7 +6,7 @@ SRCS=   snake.c
 MAN=   snake.6
 DPADD= ${LIBM} ${LIBNCURSES}
 LDADD= -lm -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 MLINKS=        snake.6 snscore.6
 
index 5700651..ff0596a 100644 (file)
@@ -5,7 +5,7 @@ PROG=   worm
 MAN=   worm.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 HIDEGAME=hidegame
 
 .include <bsd.prog.mk>
index 72c7121..a323e45 100644 (file)
@@ -5,6 +5,6 @@ PROG=   worms
 MAN=   worms.6
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 8c365e1..3066d65 100644 (file)
@@ -26,7 +26,7 @@ LDADD+=               -ldm -lprop
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../../crypto/libressl/include
 
 .PATH: ${CRYPTSETUP_SRCDIR}
index 034dd68..d081f29 100644 (file)
@@ -134,7 +134,7 @@ MKLINKS+=   lvchange.8 lvchange.1 \
 LDADD+=                -llvm -ldevmapper -lprop -lprivate_edit -lprivate_ncurses -ldevattr
 DPADD+=                ${LIBLVM} ${LIBDEVMAPPER} ${LIBPROP} ${LIBEDIT} ${LIBNCURSES}
 DPADD+=                ${LIBDEVATTR}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .PATH: ${LVM2_DISTDIR}/tools
 
index 406c59a..703ebcb 100644 (file)
@@ -4,6 +4,6 @@ PROG=   dialog
 
 DPADD= $(LIBDIALOG) ${LIBM} $(LIBNCURSESW)
 LDADD= -ldialog -lm -lprivate_ncursesw
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index d9459a6..892ce26 100644 (file)
@@ -18,7 +18,7 @@ LDADD+= -L../libiberty -liberty
 LDADD+= -L../libdecnumber -ldecnumber
 LDADD+= -L../libgnu -lgnu
 LDADD+= -lprivate_ncurses -lm -lz -lkvm -llzma
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
 
index 3f076e3..c259039 100644 (file)
@@ -17,7 +17,7 @@ LDADD+= -L../libiberty -liberty
 LDADD+= -L../libdecnumber -ldecnumber
 LDADD+= -L../libgnu -lgnu
 LDADD+= -lprivate_ncurses -lm -lz -lkvm -llzma
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 WARNS?=        2
 
index 24dbf34..857d222 100644 (file)
@@ -175,7 +175,7 @@ DPADD=      ${LIBKVM} ${LIBNCURSES} ${LIBM}
 DPADD+=        ../libbfd/libbfd.a ../libopcodes/libopcodes.a ../libiberty/libiberty.a
 LDADD= -lprivate_ncurses -lm
 LDADD+=        -L../libbfd -lbfd -L../libopcodes -lopcodes -L../libiberty -liberty
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include "Makefile.${TARGET_ARCH}"
 
index 89a1d6d..0bad784 100644 (file)
@@ -15,7 +15,7 @@ WARNS?=       2
 
 DPADD= ${LIBBZ2} ${LIBLZMA} ${LIBMD} ${LIBRECRYPTO} ${LIBZ}
 LDADD= -lbz2 -llzma -lmd -lprivate_crypto -lz
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 INCS=  archive.h archive_entry.h
 
index c0079b9..95dcd6b 100644 (file)
@@ -13,7 +13,7 @@ CFLAGS+=      -I${SRCDIR} -I${.CURDIR} -I${.OBJDIR}
 
 DPADD=         ${LIBNCURSES}
 LDADD=         -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 WARNS?=                2
 
index e0c9f5d..10cfb13 100644 (file)
@@ -14,7 +14,7 @@ NO_STRICT_ALIASING=
 CFLAGS+=       -DWITH_SSL -I${.CURDIR}/../../crypto/libressl/include
 DPADD=         ${LIBRESSL} ${LIBRECRYPTO}
 LDADD=         -lprivate_ssl -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .else
 DPADD=         ${LIBMD}
 LDADD=         -lmd
index dc02f06..8b3c58e 100644 (file)
@@ -31,7 +31,7 @@ CFLAGS+=      -DINSECURE_OVERRIDE -DPATH_ACCESS_FILE=${ACCESSFILE}
 
 LDADD+=        -lmd -lprivate_crypto
 DPADD+=        ${LIBMD} ${LIBRECRYPTO}
-LDFLAGS+=  -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 MAN=   ${OPIE_DIST}/opie.4 ${OPIE_DIST}/opiekeys.5 ${OPIE_DIST}/opieaccess.5
 
index 8a6321c..a9e296c 100644 (file)
@@ -31,7 +31,7 @@ INCS=         radlib.h radlib_vs.h
 .if !defined(NO_CRYPT)
 DPADD=         ${LIBRECRYPTO}
 LDADD=         -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -DWITH_SSL -I${.CURDIR}/../../crypto/libressl/include
 .else
 DPADD=         ${LIBMD}
index 03d503a..d351302 100644 (file)
@@ -25,7 +25,7 @@ INCSDIR=      ${INCLUDEDIR}/priv/openssl
 
 LDADD=         -lprivate_crypto
 DPADD=         ${LIBRECRYPTO}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .PATH: ${LSSL_SRC} ${LIBRESSL_SRC}/include/openssl
 
index 6512979..7d3a077 100644 (file)
@@ -8,6 +8,6 @@ DPADD=          ${LIBSSH} ${LIBRECRYPTO} ${LIBCRYPT}
 
 CFLAGS+=       -I${.CURDIR}/../../../crypto/openssh
 CFLAGS+=       -I${.CURDIR}/../../../crypto/libressl/include
-LDFLAGS+=      -rpath /lib/priv:/usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.lib.mk>
index b318d76..75acef9 100644 (file)
@@ -12,7 +12,7 @@ CFLAGS+=      -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.9+"'
 
 DPADD=         ${LIBRESSL} ${LIBRECRYPTO}
 LDADD=         -lprivate_ssl -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../../crypto/libressl/include
 
 BINOWN= root
index 068259d..c7cb96c 100644 (file)
@@ -22,7 +22,7 @@ LIBTELNET=    ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
 
 DPADD=         ${LIBUTIL} ${LIBNCURSES} ${LIBTELNET}
 LDADD=         -lutil -lprivate_ncurses ${LIBTELNET}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .if !defined(NO_CRYPT)
 SRCS+=         authenc.c
index 48e5a9e..8651a64 100644 (file)
@@ -10,7 +10,7 @@ DPADD+=               ${LIBPROP} ${LIBUTIL}
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index 3fd070a..72d23ee 100644 (file)
@@ -10,7 +10,7 @@ SRCS= fsdb.c fsdbutil.c \
 CFLAGS+= -I${.CURDIR}/../fsck
 LDADD+= -lprivate_edit -lprivate_ncurses
 DPADD+=        ${LIBEDIT} ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .PATH: ${.CURDIR}/../fsck ${.CURDIR}/../../sys/vfs/ufs
 WARNS?=        1
index f4c3aac..54361cb 100644 (file)
@@ -11,7 +11,7 @@ MAN=  hammer.8
 CFLAGS+= -I${.CURDIR}/../../sys
 LDADD= -lm -lutil -lhammer -lprivate_crypto
 DPADD= ${LIBM} ${LIBUTIL} ${LIBHAMMER} ${LIBRECRYPTO}
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .PATH: ${.CURDIR}/../../sys/libkern
 SRCS+= crc32.c icrc32.c
index def5da4..d613ac5 100644 (file)
@@ -12,13 +12,12 @@ DEBUG_FLAGS=-g
 CFLAGS+= -DXXH_NAMESPACE=h2_
 CFLAGS+= -I${.CURDIR}/../../sys
 CFLAGS+= -pthread
-LDADD= -ldmsg -lm -lutil -lprivate_crypto
-DPADD= ${LIBDMSG} ${LIBM} ${LIBUTIL} ${LIBRECRYPTO}
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDADD= -ldmsg -lm -lutil
+DPADD= ${LIBDMSG} ${LIBM} ${LIBUTIL}
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 #.PATH: ${.CURDIR}/../../sys/libkern
index 42d9d64..06ecd58 100644 (file)
@@ -1,6 +1,5 @@
 #      @(#)Makefile    8.1 (Berkeley) 7/19/93
 # $FreeBSD: src/sbin/init/Makefile,v 1.20.2.4 2001/08/01 06:37:01 obrien Exp $
-# $DragonFly: src/sbin/init/Makefile,v 1.5 2006/10/17 00:55:41 pavalos Exp $
 
 PROG=  init
 MAN=   init.8
@@ -13,7 +12,7 @@ INSTALLFLAGS+= -fschg
 CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DSUPPORT_UTMPX
 DPADD= ${LIBUTIL} ${LIBCRYPT} ${LIBRECRYPTO}
 LDADD= -lutil -lcrypt -lprivate_crypto
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 NOSHARED=yes
 
index 18fa17b..80f7543 100644 (file)
@@ -4,7 +4,7 @@ SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c
 PROG= iscontrol
 DPADD= ${LIBCAM} ${LIBMD} ${LIBRECRYPTO}
 LDADD= -lcam -lmd -lprivate_crypto
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CFLAGS += -I${.CURDIR}/../../sys/dev/disk/iscsi/initiator
 #CFLAGS += -g -DDEBUG
index 20bb92d..c996ea9 100644 (file)
@@ -15,6 +15,6 @@ MLINKS=       md5.1 rmd160.1 \
 
 DPADD= ${LIBMD} ${LIBRECRYPTO}
 LDADD= -lmd -lprivate_crypto
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index bf35c3a..6b320f3 100644 (file)
@@ -10,7 +10,7 @@ BINMODE=4555
 
 LDADD= -lipsec -lm -lmd -lprivate_crypto
 DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD} ${LIBRECRYPTO}
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 NO_STRICT_ALIASING=
 
 # kame scopeid hack
index 388abed..175bd00 100644 (file)
@@ -17,7 +17,7 @@ DPADD=                ${LIBDM} ${LIBPROP} ${LIBUTIL}
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 CFLAGS+=       -I${TCPLAY_DIR}
index ad4c1b6..9e6de2d 100644 (file)
@@ -8,6 +8,6 @@ WARNS?= 2
 CFLAGS+=       -I${.CURDIR}/../../lib/libedit -I${.CURDIR}/../../sys
 DPADD= ${LIBEDIT} ${LIBNCURSES} ${LIBDEVSTAT}
 LDADD= -lprivate_edit -lprivate_ncurses -ldevstat
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index d9e27e7..6f030b8 100644 (file)
@@ -60,8 +60,8 @@ CRUNCH_ALIAS_ssh= scp
 
 CRUNCH_KEEP_ssh= roaming_write roaming_read add_recv_bytes
 
-CRUNCH_LIBS+=  -lprivate_ssh -lprivate_crypto -lz -lpthread \
-               -rpath /lib/priv:/usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+CRUNCH_LIBS+=  ${PRIVATELIB_LDFLAGS}
+CRUNCH_LIBS+=  -lprivate_ssh -lprivate_crypto -lz -lpthread
 
 .include <bsd.crunchgen.mk>
 .include <bsd.prog.mk>
index d50d639..bc4025e 100644 (file)
@@ -25,7 +25,7 @@ CRUNCH_SRCDIRS+= usr.sbin/802_11
 CRUNCH_PROGS_usr.sbin/802_11= wpa_supplicant
 CRUNCH_LIBS+= -lpcap -lprivate_ssl -lmd -lprivate_crypto
 CRUNCH_LIBS+= -lipsec
-CRUNCH_LIBS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+CRUNCH_LIBS+= ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.crunchgen.mk>
 .include <bsd.prog.mk>
index 9e2dec0..c182a16 100644 (file)
@@ -82,7 +82,7 @@ SYMLINKS+=    lvm ${BINDIR}/lvchange \
 LDADD+=                -llvm -ldevmapper -lprop -lprivate_edit -lprivate_ncurses -ldevattr
 DPADD+=                ${LIBLVM} ${LIBDEVMAPPER} ${LIBPROP} ${LIBEDIT} ${LIBNCURSES}
 DPADD+=                ${LIBDEVATTR}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .PATH: ${LVM2_DISTDIR}/tools
 
index 781e96f..9b875a3 100644 (file)
@@ -65,7 +65,7 @@ CRUNCH_ALIAS_swapon= swapoff swapctl
 CRUNCH_LIBS+= -lcam -lsbuf -lutil -lkvm -lm -lhammer -lkiconv
 CRUNCH_LIBS+= -lprivate_edit -lprivate_ncurses -ldevstat -lprop -lpthread
 CRUNCH_LIBS+= -lbsdxml -lipsec
-CRUNCH_LIBS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+CRUNCH_LIBS+= ${PRIVATELIB_LDFLAGS}
 
 CRUNCH_SRCDIRS+= usr.sbin
 CRUNCH_PROGS_usr.sbin= boot0cfg chroot
index c01b1b8..d38055b 100644 (file)
@@ -41,6 +41,8 @@ TARGET_PROFLIBDIR?=   ${PROFLIBDIR:S!/profile$!/priv/profile!}
 TARGET_SHLIBDIR?=      ${SHLIBDIR}/priv
 .endif
 
+PRIVATELIB_LDFLAGS?=   -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+
 # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
 # .So used for PIC object files
 .SUFFIXES:
index a116e5b..c0e9d63 100644 (file)
@@ -7,6 +7,9 @@
 
 CFLAGS+=${COPTS} ${DEBUG_FLAGS}
 
+PRIVATELIB_BLDFLAGS?=  -rpath /lib/priv -L /usr/lib/priv
+PRIVATELIB_LDFLAGS?=   -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+
 .if !defined(DEBUG_FLAGS)
 STRIP?=        -s
 .endif
index c9e90a7..75cd799 100644 (file)
 ALL=   cryptotest cryptokeytest cryptostats \
        ubsecstats hifnstats ipsecstats
 BINDIR=        /usr/local/bin
+PRIVATELIB_LDFLAGS?= -rpath /lib/priv:/usr/lib/priv -L /usr/lib/priv
 
 all:   ${ALL}
 
 # program to test asymmetric crypto functions
 cryptokeytest: cryptokeytest.c
        ${CC} -o cryptokeytest cryptokeytest.c \
-        -rpath /lib/priv:/usr/lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv \
+        -rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS} \
         -lprivate_crypto
 
 # program to dump statistics kept by the core crypto code
index 8549b49..a300b39 100644 (file)
@@ -4,7 +4,7 @@ PROG=   stumbler
 BINDIR=        /usr/local/bin
 DPADD= ${LIBPCAP} ${LIBNCURSES}
 LDADD= -lpcap -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS=-g
 NOMAN=
 
index c7bb6d8..929c55f 100644 (file)
@@ -8,7 +8,7 @@ LDFLAGS=        -L${W00T}
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../../../../crypto/libressl/include
 
 BINDIR=        /usr/local/bin
index 96da193..c4f6f18 100644 (file)
@@ -7,7 +7,7 @@ WARNS?=         3
 
 DPADD=         ${LIBEDIT} ${LIBNCURSES}
 LDADD=         -lprivate_edit -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 SCRIPTS=       bc.library
 SCRIPTSMODE=   444
index ec40004..4df1329 100644 (file)
@@ -7,7 +7,7 @@ WARNS?= 2
 
 DPADD=         ${LIBRECRYPTO}
 LDADD=         -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index 9b66abe..ed95fad 100644 (file)
@@ -10,7 +10,7 @@ LDADD=        -lrpcsvc
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index 7b68ba3..fe5e2a4 100644 (file)
@@ -6,7 +6,7 @@ WARNS?= 2
 
 DPADD=         ${LIBRECRYPTO}
 LDADD=         -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index d922606..f189e94 100644 (file)
@@ -11,7 +11,6 @@ LDADD=                -lprivate_ldns -lprivate_crypto
 DPADD=         ${LIBLDNS} ${LIBRECRYPTO}
 CFLAGS+=       -I${.CURDIR} -I${LDNS} -I${LDNS}/drill -I${LDNSBASE}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
-LDFLAGS+=      -rpath /lib/priv:/usr/lib/priv -L \
-               ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      -rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index b752f51..b29627c 100644 (file)
@@ -10,7 +10,7 @@ LINKS=        ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit
 MLINKS=        ee.1 ree.1 ee.1 edit.1
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 WARNS?=        2
 
index 26a7f64..d7f412c 100644 (file)
@@ -6,7 +6,7 @@ LDADD=          -lfetch
 
 DPADD+=                ${LIBRESSL} ${LIBRECRYPTO}
 LDADD+=                -lprivate_ssl -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index c5765e0..ad410eb 100644 (file)
@@ -18,7 +18,7 @@ CFLAGS+=-I${.CURDIR} -I${.OBJDIR} -I${CONTRIBDIR} \
        -D__dead=__dead2 -DUSE_GLOB_H
 LDADD= -lprivate_edit -lprivate_ncurses -lutil
 DPADD= ${LIBEDIT} ${LIBNCURSES} ${LIBUTIL}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .if !defined(NO_CRYPT)
 SRCS+=         ssl.c
index 114c83b..118035d 100644 (file)
@@ -10,7 +10,7 @@ SRCS= main.c screen.c brac.c ch.c charset.c cmdbuf.c \
 CFLAGS+=       -I${.CURDIR} -DSYSDIR=\"/etc\"
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 SCRIPTS= lesspipe.sh
 SCRIPTSNAME= lesspipe.sh
index 927ed1d..bf3435c 100644 (file)
@@ -4,6 +4,6 @@
 PROG=  msgs
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 08ab836..804040c 100644 (file)
@@ -22,6 +22,6 @@ CFLAGS+=-DHAVE_ARC4RANDOM_BUF -DHAVE_STRTONUM \
 
 DPADD= ${LIBRECRYPTO} ${LIBRESSL}
 LDADD= -lprivate_ssl -lprivate_crypto
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 25cb193..7b7ec5f 100644 (file)
@@ -4,7 +4,7 @@ PROG= ncal
 
 DPADD+=                ${LIBCALENDAR} ${LIBNCURSES}
 LDADD+=                -lcalendar -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 LINKS=         ${BINDIR}/ncal ${BINDIR}/cal
 MLINKS=                ncal.1 cal.1
index 0c04cce..6f1ff4d 100644 (file)
@@ -12,7 +12,7 @@ LDADD=        -lrpcsvc
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 .include <bsd.prog.mk>
index 84b55d7..464bd92 100644 (file)
@@ -8,7 +8,7 @@ WARNS?= 2
 
 DPADD+=                ${LIBRESSL} ${LIBRECRYPTO}
 LDADD+=                -lprivate_ssl -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 CFLAGS+=       -DMONOLITH -I${.CURDIR}
 
index 0bd86df..145f5e6 100644 (file)
@@ -10,7 +10,7 @@ SRCS+=        fmt_scaled.c
 DPADD+=        ${LIBEDIT} ${LIBNCURSES}
 LDADD+=        -lprivate_edit -lprivate_ncurses
 # LDFLAGS is set to same value by Makefile.ssh.common so avoid duplication
-#LDFLAGS+=     -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+#LDFLAGS+=     ${PRIVATELIB_LDFLAGS}
 
 .include "../../Makefile.ssh.common"
 .include <bsd.prog.mk>
index 30aa8e5..11a0534 100644 (file)
@@ -17,7 +17,7 @@ BINMODE=2555
 
 DPADD+=        ${LIBUTIL}
 LDADD+=        -lutil
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CFLAGS+= -I${.CURDIR}/../../usr.bin/who -DSUPPORT_UTMP -DSUPPORT_UTMPX
 
index 5e852d6..b89a795 100644 (file)
@@ -3,6 +3,6 @@
 PROG=  tabs
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 8e43f5e..9173a32 100644 (file)
@@ -4,7 +4,7 @@
 PROG=  talk
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 SRCS=  ctl.c ctl_transact.c display.c get_addrs.c get_iface.c get_names.c \
        init_disp.c invite.c io.c look_up.c msgs.c talk.c
 
index 66d9e89..9827d80 100644 (file)
@@ -18,7 +18,7 @@ CFLAGS+=      -DINET6
 
 DPADD=         ${LIBNCURSES} ${LIBTELNET}
 LDADD=         -lprivate_ncurses ${LIBTELNET}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CFLAGS+=       -DIPSEC
 DPADD+=                ${LIBIPSEC}
@@ -29,7 +29,6 @@ SRCS+=                authenc.c
 CFLAGS+=       -DENCRYPTION -DAUTHENTICATION
 DPADD+=                ${LIBRECRYPTO} ${LIBCRYPT} ${LIBPAM}
 LDADD+=                -lprivate_crypto -lcrypt ${MINUSLPAM}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 .endif
 
index e004f66..f35c977 100644 (file)
@@ -4,6 +4,6 @@ PROG=   tftp
 SRCS=  main.c tftp.c tftpsubs.c
 DPADD= ${LIBEDIT} ${LIBNCURSES}
 LDADD= -lprivate_edit -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 8b468c6..6bc5e73 100644 (file)
@@ -26,12 +26,12 @@ LDADD=              -lncurses
 .  else
 DPADD=         ${LIBNCURSES}
 LDADD=         -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L /usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_BLDFLAGS}
 .  endif
 .else
 DPADD=         ${LIBNCURSES}
 LDADD=         -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 ncurses_def.h:
index 6cb153f..c911b62 100644 (file)
@@ -19,7 +19,7 @@ SRCS= commands.c getopt.c screen.c username.c version.c \
 
 DPADD=  ${LIBNCURSES} ${LIBM} ${LIBKVM} ${LIBKINFO}
 LDADD=  -lprivate_ncurses -lm -lkvm -lkinfo
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 BINGRP= kmem
 BINMODE=2555
 
index c6471f2..6d44be4 100644 (file)
@@ -4,7 +4,7 @@
 PROG=  tput
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 SCRIPTS=clear.sh
 MLINKS=        tput.1 clear.1
 
index 2020d6c..9b04309 100644 (file)
@@ -5,7 +5,7 @@ SRCS=   map.c misc.c set.c term.c tset.c wrterm.c
 
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 LINKS= ${BINDIR}/tset ${BINDIR}/reset
 MLINKS=        tset.1 reset.1
 
index 8748059..be86591 100644 (file)
@@ -5,6 +5,6 @@ PROG=   ul
 
 DPADD= ${LIBNCURSES}
 LDADD= -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index f182fba..cac892d 100644 (file)
@@ -6,6 +6,6 @@ FILESDIR=       ${SHAREDIR}/misc
 
 LDADD+=        -lprivate_edit -lprivate_ncurses
 DPADD+=        ${LIBEDIT} ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 8512324..56f4316 100644 (file)
@@ -38,7 +38,7 @@ LDADD=                -lutil
 
 DPADD+=                ${LIBNCURSESW}
 LDADD+=                -lprivate_ncursesw
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 CLEANFILES+=${EX}
 
index 0aec12a..5250d79 100644 (file)
@@ -18,6 +18,6 @@ SRCS= char.c cmd.c cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c cmd7.c \
 
 DPADD= ${LIBNCURSES} ${LIBUTIL}
 LDADD= -lprivate_ncurses -lutil
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 32f3066..efb9096 100644 (file)
@@ -4,7 +4,7 @@ SRCS+=          crypto_openssl.c random.c sha1-prf.c sha256-prf.c
 DPADD+=                ${LIBRESSL} ${LIBRECRYPTO}
 LDADD+=                -lprivate_ssl -lprivate_crypto
 CFLAGS+=       -DCONFIG_SHA256 -I${.CURDIR}/../../../crypto/libressl/include
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .if defined(TLS_FUNCS)
 NEED_TLS_PRF=y
index f0ca66f..9b9a2cc 100644 (file)
@@ -15,6 +15,6 @@ CFLAGS+= -DCONFIG_READLINE
 
 LDADD+= -lprivate_edit -lprivate_ncurses
 DPADD+= ${LIBEDIT} ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index aad7f5a..b0697ba 100644 (file)
@@ -4,6 +4,6 @@ PROG= cdcontrol
 
 DPADD= ${LIBEDIT} ${LIBNCURSES}
 LDADD= -lprivate_edit -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 3ca47f4..f3f2b02 100644 (file)
@@ -28,6 +28,6 @@ LIBINSTALLER=${.CURDIR}/../libinstaller/libinstaller.a
 
 DPADD+=        ${LIBINSTALLER} ${LIBDFUI} ${LIBAURA} ${LIBPANEL} ${LIBNCURSES}
 LDADD+=        ${LIBINSTALLER} ${LIBDFUI} ${LIBAURA} -lprivate_panel -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index fa0abca..999d9a0 100644 (file)
@@ -13,7 +13,7 @@ LDADD=        -lrpcsvc
 
 DPADD+=                ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 
 RPCDIR=        ${DESTDIR}/usr/include/rpcsvc
index c3ca35f..cec1e2d 100644 (file)
@@ -13,6 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common_source
 
 DPADD= ${LIBLPR} ${LIBEDIT} ${LIBNCURSES}
 LDADD= ${LIBLPR} -lprivate_edit -lprivate_ncurses
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 98d9670..8323d9c 100644 (file)
@@ -16,7 +16,7 @@ SRCS+=        sha1hl.c
 CFLAGS+= -DUSE_MD5 -DUSE_SHA1 -DUSE_RMD160
 DPADD=  ${LIBMD} ${LIBRECRYPTO}
 LDADD=  -lmd -lprivate_crypto
-LDFLAGS+= -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 
 .include <bsd.prog.mk>
index fa04a3a..c2df856 100644 (file)
@@ -60,7 +60,7 @@ CFLAGS+=-DNODES
 SRCS+=         chap_ms.c mppe.c
 LDADD+=        -lprivate_crypto
 DPADD+=        ${LIBRECRYPTO}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 .endif
 
index 31bf84c..6114be1 100644 (file)
@@ -5,6 +5,6 @@ MAN=    pppctl.8
 WARNS?=        2
 LDADD+= -lprivate_edit -lprivate_ncurses
 DPADD+= ${LIBEDIT} ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index 7b20e20..baa97de 100644 (file)
@@ -30,7 +30,7 @@ CFLAGS+=      -DCHAPMS
 SRCS+=         chap_ms.c
 LDADD+=                -lprivate_crypto
 DPADD+=                ${LIBRECRYPTO}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
 .endif
 
index 510738c..43c789c 100644 (file)
@@ -56,7 +56,7 @@ DPADD+=               ${LIBRECRYPTO}
 LDADD+=                -lprivate_crypto
 CFLAGS+=       -DHAVE_LIBCRYPTO -DHAVE_OPENSSL_EVP_H
 CFLAGS+=       -I${.CURDIR}/../../crypto/libressl/include
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 .endif
 WARNS?=        2
 NO_STRICT_ALIASING=
index b3ccf46..5a9ca89 100644 (file)
@@ -5,6 +5,6 @@ MAN=    tzsetup.8
 
 DPADD= ${LIBDIALOG} ${LIBM} ${LIBNCURSESW}
 LDADD= -ldialog -lm -lprivate_ncursesw
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>
index be98aee..d222b04 100644 (file)
@@ -5,6 +5,6 @@ MAN=    watch.8
 
 LDADD= -lprivate_ncurses
 DPADD= ${LIBNCURSES}
-LDFLAGS+=      -rpath /lib/priv -L ${_SHLIBDIRPREFIX}/usr/lib/priv
+LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.prog.mk>