1# $Id: Makefile.in,v 1.340 2013/06/11 01:26:10 dtucker Exp $ 2 3# uncomment if you run a non bourne compatable shell. Ie. csh 4#SHELL = @SH@ 5 6AUTORECONF=autoreconf 7 8prefix=@prefix@ 9exec_prefix=@exec_prefix@ 10bindir=@bindir@ 11sbindir=@sbindir@ 12libexecdir=@libexecdir@ 13datadir=@datadir@ 14datarootdir=@datarootdir@ 15mandir=@mandir@ 16mansubdir=@mansubdir@ 17sysconfdir=@sysconfdir@ 18piddir=@piddir@ 19srcdir=@srcdir@ 20top_srcdir=@top_srcdir@ 21 22DESTDIR= 23VPATH=@srcdir@ 24SSH_PROGRAM=@bindir@/ssh 25ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass 26SFTP_SERVER=$(libexecdir)/sftp-server 27SSH_KEYSIGN=$(libexecdir)/ssh-keysign 28SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper 29PRIVSEP_PATH=@PRIVSEP_PATH@ 30SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ 31STRIP_OPT=@STRIP_OPT@ 32 33PATHS= -DSSHDIR=\"$(sysconfdir)\" \ 34 -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ 35 -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ 36 -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ 37 -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ 38 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ 39 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 40 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" 41 42CC=@CC@ 43LD=@LD@ 44CFLAGS=@CFLAGS@ 45CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ 46LIBS=@LIBS@ 47K5LIBS=@K5LIBS@ 48GSSLIBS=@GSSLIBS@ 49SSHLIBS=@SSHLIBS@ 50SSHDLIBS=@SSHDLIBS@ 51LIBEDIT=@LIBEDIT@ 52AR=@AR@ 53AWK=@AWK@ 54RANLIB=@RANLIB@ 55INSTALL=@INSTALL@ 56PERL=@PERL@ 57SED=@SED@ 58ENT=@ENT@ 59XAUTH_PATH=@XAUTH_PATH@ 60LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ 61EXEEXT=@EXEEXT@ 62MANFMT=@MANFMT@ 63 64TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) 65 66LIBSSH_OBJS=authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 67 canohost.o channels.o cipher.o cipher-aes.o \ 68 cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \ 69 compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \ 70 log.o match.o md-sha256.o moduli.o nchan.o packet.o \ 71 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \ 72 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ 73 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \ 74 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \ 75 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \ 76 jpake.o schnorr.o ssh-pkcs11.o krl.o 77 78SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ 79 sshconnect.o sshconnect1.o sshconnect2.o mux.o \ 80 roaming_common.o roaming_client.o 81 82SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ 83 audit.o audit-bsm.o audit-linux.o platform.o \ 84 sshpty.o sshlogin.o servconf.o serverloop.o \ 85 auth.o auth1.o auth2.o auth-options.o session.o \ 86 auth-chall.o auth2-chall.o groupaccess.o \ 87 auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \ 88 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ 89 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \ 90 auth-krb5.o \ 91 auth2-gss.o gss-serv.o gss-serv-krb5.o \ 92 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 93 sftp-server.o sftp-common.o \ 94 roaming_common.o roaming_serv.o \ 95 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \ 96 sandbox-seccomp-filter.o 97 98MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out 99MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 100MANTYPE = @MANTYPE@ 101 102CONFIGFILES=sshd_config.out ssh_config.out moduli.out 103CONFIGFILES_IN=sshd_config ssh_config moduli 104 105PATHSUBS = \ 106 -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \ 107 -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \ 108 -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \ 109 -e 's|/usr/libexec|$(libexecdir)|g' \ 110 -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \ 111 -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \ 112 -e 's|/etc/ssh/ssh_host_ecdsa_key|$(sysconfdir)/ssh_host_ecdsa_key|g' \ 113 -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \ 114 -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \ 115 -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \ 116 -e 's|/etc/moduli|$(sysconfdir)/moduli|g' \ 117 -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \ 118 -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \ 119 -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \ 120 -e 's|/var/empty|$(PRIVSEP_PATH)|g' \ 121 -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g' 122 123FIXPATHSCMD = $(SED) $(PATHSUBS) 124FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \ 125 @UNSUPPORTED_ALGORITHMS@ 126 127all: $(CONFIGFILES) $(MANPAGES) $(TARGETS) 128 129$(LIBSSH_OBJS): Makefile.in config.h 130$(SSHOBJS): Makefile.in config.h 131$(SSHDOBJS): Makefile.in config.h 132 133.c.o: 134 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< 135 136LIBCOMPAT=openbsd-compat/libopenbsd-compat.a 137$(LIBCOMPAT): always 138 (cd openbsd-compat && $(MAKE)) 139always: 140 141libssh.a: $(LIBSSH_OBJS) 142 $(AR) rv $@ $(LIBSSH_OBJS) 143 $(RANLIB) $@ 144 145ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) 146 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS) 147 148sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) 149 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS) 150 151scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o 152 $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 153 154ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o 155 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 156 157ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o 158 $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 159 160ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o 161 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 162 163ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o 164 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 165 166ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o 167 $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) 168 169ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o 170 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) 171 172sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o 173 $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 174 175sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o 176 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT) 177 178# test driver for the loginrec code - not built by default 179logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o 180 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) 181 182$(MANPAGES): $(MANPAGES_IN) 183 if test "$(MANTYPE)" = "cat"; then \ 184 manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \ 185 else \ 186 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \ 187 fi; \ 188 if test "$(MANTYPE)" = "man"; then \ 189 $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) | \ 190 $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ 191 else \ 192 $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \ 193 fi 194 195$(CONFIGFILES): $(CONFIGFILES_IN) 196 conffile=`echo $@ | sed 's/.out$$//'`; \ 197 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ 198 199# fake rule to stop make trying to compile moduli.o into a binary "moduli.o" 200moduli: 201 echo 202 203# special case target for umac128 204umac128.o: umac.c 205 $(CC) $(CFLAGS) $(CPPFLAGS) -o umac128.o -c $(srcdir)/umac.c \ 206 -DUMAC_OUTPUT_LEN=16 -Dumac_new=umac128_new \ 207 -Dumac_update=umac128_update -Dumac_final=umac128_final \ 208 -Dumac_delete=umac128_delete 209 210clean: regressclean 211 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 212 rm -f *.out core survey 213 (cd openbsd-compat && $(MAKE) clean) 214 215distclean: regressclean 216 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 217 rm -f *.out core opensshd.init openssh.xml 218 rm -f Makefile buildpkg.sh config.h config.status 219 rm -f survey.sh openbsd-compat/regress/Makefile *~ 220 rm -rf autom4te.cache 221 (cd openbsd-compat && $(MAKE) distclean) 222 if test -d pkg ; then \ 223 rm -fr pkg ; \ 224 fi 225 226veryclean: distclean 227 rm -f configure config.h.in *.0 228 229cleandir: veryclean 230 231mrproper: veryclean 232 233realclean: veryclean 234 235catman-do: 236 @for f in $(MANPAGES_IN) ; do \ 237 base=`echo $$f | sed 's/\..*$$//'` ; \ 238 echo "$$f -> $$base.0" ; \ 239 $(MANFMT) $$f | cat -v | sed -e 's/.\^H//g' \ 240 >$$base.0 ; \ 241 done 242 243distprep: catman-do 244 $(AUTORECONF) 245 -rm -rf autom4te.cache 246 247install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config 248install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf 249install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files 250 251check-config: 252 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config 253 254install-files: 255 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) 256 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) 257 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) 258 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1 259 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5 260 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 261 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) 262 (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH)) 263 $(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT) 264 $(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT) 265 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add$(EXEEXT) $(DESTDIR)$(bindir)/ssh-add$(EXEEXT) 266 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent$(EXEEXT) $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) 267 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) 268 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) 269 $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 270 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 271 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) 272 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT) 273 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 274 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 275 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 276 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 277 $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 278 $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 279 $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 280 $(INSTALL) -m 644 moduli.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/moduli.5 281 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 282 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 283 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 284 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 285 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 286 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 287 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 288 -rm -f $(DESTDIR)$(bindir)/slogin 289 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 290 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 291 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 292 293install-sysconf: 294 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ 295 $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ 296 fi 297 @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \ 298 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \ 299 else \ 300 echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \ 301 fi 302 @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \ 303 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \ 304 else \ 305 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \ 306 fi 307 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \ 308 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \ 309 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \ 310 mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \ 311 else \ 312 $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \ 313 fi ; \ 314 else \ 315 echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \ 316 fi 317 318host-key: ssh-keygen$(EXEEXT) 319 @if [ -z "$(DESTDIR)" ] ; then \ 320 if [ -f "$(sysconfdir)/ssh_host_key" ] ; then \ 321 echo "$(sysconfdir)/ssh_host_key already exists, skipping." ; \ 322 else \ 323 ./ssh-keygen -t rsa1 -f $(sysconfdir)/ssh_host_key -N "" ; \ 324 fi ; \ 325 if [ -f $(sysconfdir)/ssh_host_dsa_key ] ; then \ 326 echo "$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \ 327 else \ 328 ./ssh-keygen -t dsa -f $(sysconfdir)/ssh_host_dsa_key -N "" ; \ 329 fi ; \ 330 if [ -f $(sysconfdir)/ssh_host_rsa_key ] ; then \ 331 echo "$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \ 332 else \ 333 ./ssh-keygen -t rsa -f $(sysconfdir)/ssh_host_rsa_key -N "" ; \ 334 fi ; \ 335 if [ -z "@COMMENT_OUT_ECC@" ] ; then \ 336 if [ -f $(sysconfdir)/ssh_host_ecdsa_key ] ; then \ 337 echo "$(sysconfdir)/ssh_host_ecdsa_key already exists, skipping." ; \ 338 else \ 339 ./ssh-keygen -t ecdsa -f $(sysconfdir)/ssh_host_ecdsa_key -N "" ; \ 340 fi ; \ 341 fi ; \ 342 fi ; 343 344host-key-force: ssh-keygen$(EXEEXT) 345 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" 346 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" 347 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" 348 test -z "@COMMENT_OUT_ECC@" && ./ssh-keygen -t ecdsa -f $(DESTDIR)$(sysconfdir)/ssh_host_ecdsa_key -N "" 349 350uninstallall: uninstall 351 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config 352 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config 353 -rmdir $(DESTDIR)$(sysconfdir) 354 -rmdir $(DESTDIR)$(bindir) 355 -rmdir $(DESTDIR)$(sbindir) 356 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1 357 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8 358 -rmdir $(DESTDIR)$(mandir) 359 -rmdir $(DESTDIR)$(libexecdir) 360 361uninstall: 362 -rm -f $(DESTDIR)$(bindir)/slogin 363 -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT) 364 -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT) 365 -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT) 366 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) 367 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) 368 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) 369 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) 370 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 371 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 372 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 373 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) 374 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 375 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 376 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 377 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 378 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 379 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 380 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 381 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 382 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 383 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 384 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 385 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 386 387regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c 388 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress 389 [ -f `pwd`/regress/Makefile ] || \ 390 ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile 391 $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $? \ 392 $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) 393 394tests interop-tests: $(TARGETS) regress/modpipe$(EXEEXT) 395 BUILDDIR=`pwd`; \ 396 TEST_SHELL="@TEST_SHELL@"; \ 397 TEST_SSH_SSH="$${BUILDDIR}/ssh"; \ 398 TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \ 399 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \ 400 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \ 401 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ 402 TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper"; \ 403 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ 404 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ 405 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ 406 TEST_SSH_PLINK="plink"; \ 407 TEST_SSH_PUTTYGEN="puttygen"; \ 408 TEST_SSH_CONCH="conch"; \ 409 TEST_SSH_IPV6="@TEST_SSH_IPV6@" ; \ 410 TEST_SSH_ECC="@TEST_SSH_ECC@" ; \ 411 TEST_SSH_SHA256="@TEST_SSH_SHA256@" ; \ 412 cd $(srcdir)/regress || exit $$?; \ 413 $(MAKE) \ 414 .OBJDIR="$${BUILDDIR}/regress" \ 415 .CURDIR="`pwd`" \ 416 BUILDDIR="$${BUILDDIR}" \ 417 OBJ="$${BUILDDIR}/regress/" \ 418 PATH="$${BUILDDIR}:$${PATH}" \ 419 TEST_SHELL="$${TEST_SHELL}" \ 420 TEST_SSH_SSH="$${TEST_SSH_SSH}" \ 421 TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \ 422 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \ 423 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \ 424 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ 425 TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \ 426 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ 427 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ 428 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ 429 TEST_SSH_PLINK="$${TEST_SSH_PLINK}" \ 430 TEST_SSH_PUTTYGEN="$${TEST_SSH_PUTTYGEN}" \ 431 TEST_SSH_CONCH="$${TEST_SSH_CONCH}" \ 432 TEST_SSH_IPV6="$${TEST_SSH_IPV6}" \ 433 TEST_SSH_ECC="$${TEST_SSH_ECC}" \ 434 TEST_SSH_SHA256="$${TEST_SSH_SHA256}" \ 435 EXEEXT="$(EXEEXT)" \ 436 $@ && echo all tests passed 437 438compat-tests: $(LIBCOMPAT) 439 (cd openbsd-compat/regress && $(MAKE)) 440 441regressclean: 442 if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \ 443 (cd regress && $(MAKE) clean) \ 444 fi 445 446survey: survey.sh ssh 447 @$(SHELL) ./survey.sh > survey 448 @echo 'The survey results have been placed in the file "survey" in the' 449 @echo 'current directory. Please review the file then send with' 450 @echo '"make send-survey".' 451 452send-survey: survey 453 mail portable-survey@mindrot.org <survey 454 455package: $(CONFIGFILES) $(MANPAGES) $(TARGETS) 456 if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \ 457 sh buildpkg.sh; \ 458 fi 459 460