]> andersk Git - gssapi-openssh.git/blame - openssh/Makefile.in
add prototype for expand_authorized_keys()
[gssapi-openssh.git] / openssh / Makefile.in
CommitLineData
3c0ef626 1# $Id$
2
2980ea68 3# uncomment if you run a non bourne compatable shell. Ie. csh
4#SHELL = @SH@
5
f5587594 6DISTPERL=perl
087f6b9d 7DISTSED=sed
d5a1ff3f 8DISTAWK=awk
2980ea68 9AUTORECONF=autoreconf
10
3c0ef626 11prefix=@prefix@
12exec_prefix=@exec_prefix@
8f01de73 13bindir=@bindir@/ssh.d
3c0ef626 14sbindir=@sbindir@
15libexecdir=@libexecdir@
16datadir=@datadir@
2e437378 17datarootdir=@datarootdir@
64d285c8 18mandir=@mandir@
3c0ef626 19mansubdir=@mansubdir@
ae43c103 20sysconfdir=$$GLOBUS_LOCATION/etc/ssh
a624eecb 21docdir=$$GLOBUS_LOCATION/doc/gsi_openssh
1c14df9e 22piddir=$$GLOBUS_LOCATION/var
3c0ef626 23srcdir=@srcdir@
24top_srcdir=@top_srcdir@
25
07e2eb8f 26globusbindir=@bindir@
07e2eb8f 27
3c0ef626 28DESTDIR=
29VPATH=@srcdir@
8f01de73 30SSH_PROGRAM=$(bindir)/ssh
3c0ef626 31ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
32SFTP_SERVER=$(libexecdir)/sftp-server
ff2d7a98 33SSH_KEYSIGN=$(libexecdir)/ssh-keysign
34RAND_HELPER=$(libexecdir)/ssh-rand-helper
766fdec6 35PRIVSEP_PATH=/var/empty
ff2d7a98 36SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
1c14df9e 37STRIP_OPT=@STRIP_OPT@
2980ea68 38
d7766c89 39PATHS= -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\"
3c0ef626 40
3c0ef626 41CC=@CC@
42LD=@LD@
43CFLAGS=@CFLAGS@
44CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
45LIBS=@LIBS@
2e437378 46LIBSELINUX=@LIBSELINUX@
47SSHDLIBS=@SSHDLIBS@
34fee935 48LIBEDIT=@LIBEDIT@
e9a17296 49LIBPAM=@LIBPAM@
50LIBWRAP=@LIBWRAP@
3c0ef626 51AR=@AR@
70791e56 52AWK=@AWK@
3c0ef626 53RANLIB=@RANLIB@
54INSTALL=@INSTALL@
55PERL=@PERL@
1c14df9e 56SED=@SED@
3c0ef626 57ENT=@ENT@
58XAUTH_PATH=@XAUTH_PATH@
59LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
60EXEEXT=@EXEEXT@
3c0ef626 61
62INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
e9a17296 63INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
3c0ef626 64
1c14df9e 65TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT)
66
1d3ebb02 67#
68# objects to add to LIBSSH_OBJS
69# pathnames.o
70#
71
2e437378 72LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
416fd2a8 73 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
74 cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
75 compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
2e437378 76 log.o match.o md-sha256.o moduli.o nchan.o packet.o \
34fee935 77 readpass.o rsa.o ttymodes.o xmalloc.o \
1b56ff3d 78 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
79 monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \
80 kexgex.o kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \
70791e56 81 pathnames.o \
34fee935 82 entropy.o scard-opensc.o gss-genr.o kexgssc.o
1c14df9e 83
84SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
85 sshconnect.o sshconnect1.o sshconnect2.o
86
87SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
1b56ff3d 88 sshpty.o sshlogin.o servconf.o serverloop.o \
1c14df9e 89 auth.o auth1.o auth2.o auth-options.o session.o \
90 auth-chall.o auth2-chall.o groupaccess.o \
91 auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
92 auth2-none.o auth2-passwd.o auth2-pubkey.o \
1b56ff3d 93 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \
70791e56 94 auth-krb5.o \
e00da40d 95 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
96 gss-serv-gsi.o \
34fee935 97 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
2e437378 98 audit.o audit-bsm.o platform.o
3c0ef626 99
ff2d7a98 100MANPAGES = 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-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out
101MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 sshd_config.5 ssh_config.5
3c0ef626 102MANTYPE = @MANTYPE@
103
104CONFIGFILES=sshd_config.out ssh_config.out moduli.out
105CONFIGFILES_IN=sshd_config ssh_config moduli
106
107PATHSUBS = \
1c14df9e 108 -e 's|/etc/ssh/ssh_prng_cmds|$(sysconfdir)/ssh_prng_cmds|g' \
109 -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \
110 -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \
111 -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \
112 -e 's|/usr/libexec|$(libexecdir)|g' \
113 -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \
114 -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \
115 -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \
116 -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
117 -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
118 -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \
2e437378 119 -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \
1c14df9e 120 -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \
121 -e 's|/var/empty|$(PRIVSEP_PATH)|g' \
122 -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g'
123
124FIXPATHSCMD = $(SED) $(PATHSUBS)
087f6b9d 125DISTFIXPATHSCMD = $(DISTSED) $(PATHSUBS)
3c0ef626 126
70791e56 127all: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS)
3c0ef626 128
f5587594 129gpt-all: $(TARGETS)
f406a57e 130
70791e56 131$(LIBSSH_OBJS): Makefile.in config.h
132$(SSHOBJS): Makefile.in config.h
133$(SSHDOBJS): Makefile.in config.h
3c0ef626 134
135.c.o:
136 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
137
138LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
139$(LIBCOMPAT): always
140 (cd openbsd-compat && $(MAKE))
141always:
142
143libssh.a: $(LIBSSH_OBJS)
144 $(AR) rv $@ $(LIBSSH_OBJS)
145 $(RANLIB) $@
146
147ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
148 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
149
150sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
2e437378 151 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBSELINUX) $(SSHDLIBS) $(LIBS)
3c0ef626 152
1c14df9e 153scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
e00da40d 154 $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
3c0ef626 155
156ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
416fd2a8 157 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
3c0ef626 158
159ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o
416fd2a8 160 $(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
3c0ef626 161
162ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
416fd2a8 163 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
3c0ef626 164
ff2d7a98 165ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o
416fd2a8 166 $(LD) -o $@ ssh-keysign.o readconf.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ff2d7a98 167
3c0ef626 168ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o
416fd2a8 169 $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
3c0ef626 170
171sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o
416fd2a8 172 $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
3c0ef626 173
416fd2a8 174sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
34fee935 175 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
3c0ef626 176
e9a17296 177ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
178 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
179
3c0ef626 180# test driver for the loginrec code - not built by default
181logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
182 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
183
184$(MANPAGES): $(MANPAGES_IN)
185 if test "$(MANTYPE)" = "cat"; then \
186 manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \
187 else \
188 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
189 fi; \
190 if test "$(MANTYPE)" = "man"; then \
70791e56 191 $(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \
3c0ef626 192 else \
193 $(FIXPATHSCMD) $${manpage} > $@; \
194 fi
195
196$(CONFIGFILES): $(CONFIGFILES_IN)
197 conffile=`echo $@ | sed 's/.out$$//'`; \
198 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
199
70791e56 200ssh_prng_cmds.out: ssh_prng_cmds
201 if test ! -z "$(INSTALL_SSH_PRNG_CMDS)"; then \
202 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
203 fi
204
34fee935 205# fake rule to stop make trying to compile moduli.o into a binary "moduli.o"
70791e56 206moduli:
207 echo
208
209clean: regressclean
416fd2a8 210 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
34fee935 211 rm -f *.out core survey
3c0ef626 212 (cd openbsd-compat && $(MAKE) clean)
213
70791e56 214distclean: regressclean
416fd2a8 215 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
2e437378 216 rm -f *.out core opensshd.init openssh.xml
217 rm -f Makefile buildpkg.sh config.h config.status ssh_prng_cmds
218 rm -f survey.sh openbsd-compat/regress/Makefile *~
3c0ef626 219 rm -rf autom4te.cache
220 (cd openbsd-compat && $(MAKE) distclean)
221 (cd scard && $(MAKE) distclean)
1b56ff3d 222 if test -d pkg ; then \
223 rm -fr pkg ; \
224 fi
3c0ef626 225
70791e56 226veryclean: distclean
3c0ef626 227 rm -f configure config.h.in *.0
3c0ef626 228
70791e56 229mrproper: veryclean
230
231realclean: veryclean
3c0ef626 232
233catman-do:
f5587594 234 mkdir -p ./cat/
235 mkdir -p ./man/
83e0a891 236 mkdir -p ./mdoc/
3c0ef626 237 @for f in $(MANPAGES_IN) ; do \
83e0a891 238 echo -n "$$f -> mdoc.." ; \
239 $(DISTFIXPATHSCMD) $$f > ./mdoc/$$f ; \
240 echo -n "cat.." ; \
241 nroff -mandoc ./mdoc/$$f | cat -v | sed -e 's/.\^H//g' > ./cat/$$f ; \
f5587594 242 echo -n "man.." ; \
d5a1ff3f 243 cat ./mdoc/$$f | $(DISTAWK) -f ./mdoc2man.awk > ./man/$$f ; \
f5587594 244 echo "done." ; \
3c0ef626 245 done
246
247distprep: catman-do
2980ea68 248 $(AUTORECONF)
416fd2a8 249 -rm -rf autom4te.cache
3c0ef626 250 (cd scard && $(MAKE) -f Makefile.in distprep)
251
34fee935 252install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
253install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf
254install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
3c0ef626 255
258769aa 256gpt-install: gpt-all gpt-install-files
257gpt-install-nokeys: gpt-all gpt-install-files
f406a57e 258
e54b3d7c 259check-config:
260 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
ff2d7a98 261
3c0ef626 262scard-install:
263 (cd scard && $(MAKE) DESTDIR=$(DESTDIR) install)
264
265install-files: scard-install
266 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
267 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
268 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
269 $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
270 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
ff2d7a98 271 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5
3c0ef626 272 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
273 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
e54b3d7c 274 (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH))
1c14df9e 275 $(INSTALL) -m 0755 $(STRIP_OPT) ssh $(DESTDIR)$(bindir)/ssh
276 $(INSTALL) -m 0755 $(STRIP_OPT) scp $(DESTDIR)$(bindir)/scp
277 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add $(DESTDIR)$(bindir)/ssh-add
278 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent $(DESTDIR)$(bindir)/ssh-agent
279 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
280 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
281 $(INSTALL) -m 0755 $(STRIP_OPT) sshd $(DESTDIR)$(sbindir)/sshd
e9a17296 282 if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \
1c14df9e 283 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
e9a17296 284 fi
1c14df9e 285 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
286 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp
287 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER)
3c0ef626 288 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
289 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
290 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
291 $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
292 $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
293 $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
ff2d7a98 294 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
295 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
3c0ef626 296 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
ff2d7a98 297 if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \
2980ea68 298 $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
299 fi
1c14df9e 300 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
301 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
ff2d7a98 302 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
3c0ef626 303 -rm -f $(DESTDIR)$(bindir)/slogin
e54b3d7c 304 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
3c0ef626 305 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
e54b3d7c 306 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
34fee935 307
308install-sysconf:
3c0ef626 309 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
310 $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
311 fi
e54b3d7c 312 @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
3c0ef626 313 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
314 else \
315 echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
316 fi
e54b3d7c 317 @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
3c0ef626 318 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
319 else \
320 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
321 fi
34fee935 322 @if [ -f ssh_prng_cmds ] && [ ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
3c0ef626 323 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
324 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
325 else \
326 echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
327 fi ; \
328 fi
e54b3d7c 329 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
3c0ef626 330 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
331 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
332 mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
333 else \
334 $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
335 fi ; \
336 else \
337 echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
338 fi
339
37b75ddb 340###
336f92ec 341#
37b75ddb 342# Upon a new OpenSSH merge into the repository:
7b624033 343#
f5587594 344# o Set up new catman-do.
345# o Set up new gpt-all.
346# o Remove $(MANPAGES) and $(CONFIGFILES) from target list.
37b75ddb 347# o Set up new gpt-install-files.
348# o Destroy current/old gpt-install-files target.
349# o Copy install-files target into gpt-install-files target.
f5587594 350# o Remove the following sections:
1c14df9e 351# o Copying the configuration files (ssh_config, sshd_config, ssh_prng_cmds, moduli).
f5587594 352# o The scard-install target.
353# o Creating and chmod'ing PRIVSEP_PATH.
1c14df9e 354# o Stripping of installed binaries.
355# o The conditionals around ssh-rand-helper*.
88928908 356# o Install docs into $GL/doc/gsi_openssh by adding 'gpt-install-docs' target.
f5587594 357# o Add links for gsi tools (gsissh -> ssh, etc).
358# o Refer to the new man and cat pages.
336f92ec 359#
360
88928908 361gpt-install-files: gpt-install-docs
258769aa 362 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
07e2eb8f 363 $(srcdir)/mkinstalldirs $(DESTDIR)$(globusbindir)
258769aa 364 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
258769aa 365 $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
518661be 366 docdir=man; \
367 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir); \
368 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1; \
369 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5; \
8b40ca58 370 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8; \
371 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1/ssh.d; \
372 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5/ssh.d; \
373 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8/ssh.d
518661be 374 docdir=cat; \
375 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir); \
376 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1; \
377 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5; \
8b40ca58 378 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8; \
379 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1/ssh.d; \
380 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5/ssh.d; \
381 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8/ssh.d
1c14df9e 382 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
8b46b951 383 $(INSTALL) -m 0755 $(STRIP_OPT) ssh $(DESTDIR)$(bindir)/ssh
384 $(INSTALL) -m 0755 $(STRIP_OPT) scp $(DESTDIR)$(bindir)/scp
385 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add $(DESTDIR)$(bindir)/ssh-add
386 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent $(DESTDIR)$(bindir)/ssh-agent
387 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
388 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
389 $(INSTALL) -m 0755 $(STRIP_OPT) sshd $(DESTDIR)$(sbindir)/sshd
390 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper
391 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
392 $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp
393 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER)
e54b3d7c 394 -rm -f $(DESTDIR)$(bindir)/slogin
395 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
07e2eb8f 396 -rm -f $(DESTDIR)$(globusbindir)/gsissh
397 ln -s ./ssh.d/ssh$(EXEEXT) $(DESTDIR)$(globusbindir)/gsissh
398 -rm -f $(DESTDIR)$(globusbindir)/gsiscp
399 ln -s ./ssh.d/scp$(EXEEXT) $(DESTDIR)$(globusbindir)/gsiscp
400 -rm -f $(DESTDIR)$(globusbindir)/gsisftp
401 ln -s ./ssh.d/sftp$(EXEEXT) $(DESTDIR)$(globusbindir)/gsisftp
518661be 402 # start man
403 docdir=man; \
8b40ca58 404 $(INSTALL) -m 644 $${docdir}/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh.1; \
405 $(INSTALL) -m 644 $${docdir}/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/scp.1; \
406 $(INSTALL) -m 644 $${docdir}/ssh-add.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-add.1; \
407 $(INSTALL) -m 644 $${docdir}/ssh-agent.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-agent.1; \
408 $(INSTALL) -m 644 $${docdir}/ssh-keygen.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-keygen.1; \
409 $(INSTALL) -m 644 $${docdir}/ssh-keyscan.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-keyscan.1; \
410 $(INSTALL) -m 644 $${docdir}/sshd_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh.d/sshd_config.5; \
411 $(INSTALL) -m 644 $${docdir}/ssh_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh.d/ssh_config.5; \
412 $(INSTALL) -m 644 $${docdir}/sshd.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/sshd.8; \
413 $(INSTALL) -m 644 $${docdir}/ssh-rand-helper.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/ssh-rand-helper.8; \
414 $(INSTALL) -m 644 $${docdir}/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/sftp.1; \
415 $(INSTALL) -m 644 $${docdir}/sftp-server.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/sftp-server.8; \
416 $(INSTALL) -m 644 $${docdir}/ssh-keysign.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/ssh-keysign.8; \
417 rm -f $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/slogin.1; \
418 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/slogin.1; \
419 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
420 ln -s ./ssh.d/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
421 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
422 ln -s ./ssh.d/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
423 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsisftp.1; \
424 ln -s ./ssh.d/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsisftp.1;
518661be 425 # end man
426 # start cat
427 docdir=cat; \
8b40ca58 428 $(INSTALL) -m 644 $${docdir}/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh.1; \
429 $(INSTALL) -m 644 $${docdir}/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/scp.1; \
430 $(INSTALL) -m 644 $${docdir}/ssh-add.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-add.1; \
431 $(INSTALL) -m 644 $${docdir}/ssh-agent.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-agent.1; \
432 $(INSTALL) -m 644 $${docdir}/ssh-keygen.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-keygen.1; \
433 $(INSTALL) -m 644 $${docdir}/ssh-keyscan.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/ssh-keyscan.1; \
434 $(INSTALL) -m 644 $${docdir}/sshd_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh.d/sshd_config.5; \
435 $(INSTALL) -m 644 $${docdir}/ssh_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh.d/ssh_config.5; \
436 $(INSTALL) -m 644 $${docdir}/sshd.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/sshd.8; \
437 $(INSTALL) -m 644 $${docdir}/ssh-rand-helper.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/ssh-rand-helper.8; \
438 $(INSTALL) -m 644 $${docdir}/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/sftp.1; \
439 $(INSTALL) -m 644 $${docdir}/sftp-server.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/sftp-server.8; \
440 $(INSTALL) -m 644 $${docdir}/ssh-keysign.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh.d/ssh-keysign.8; \
441 rm -f $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/slogin.1; \
442 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.d/slogin.1; \
443 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
444 ln -s ./ssh.d/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
445 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
446 ln -s ./ssh.d/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
447 rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsisftp.1; \
448 ln -s ./ssh.d/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsisftp.1;
518661be 449 # end cat
88928908 450
451gpt-install-docs:
1c14df9e 452 # make doc dir and copy docs into it
a624eecb 453 if [ ! -d $(DESTDIR)$(docdir) ]; then \
454 $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir); \
455 fi
456 $(INSTALL) -m 644 README $(DESTDIR)$(docdir)/README
457 $(INSTALL) -m 644 README.gpt $(DESTDIR)$(docdir)/README.gpt
458 $(INSTALL) -m 644 README.privsep $(DESTDIR)$(docdir)/README.privsep
459 $(INSTALL) -m 644 INSTALL $(DESTDIR)$(docdir)/INSTALL
460 $(INSTALL) -m 644 WARNING.RNG $(DESTDIR)$(docdir)/WARNING.RNG
461 $(INSTALL) -m 644 LICENCE $(DESTDIR)$(docdir)/LICENSE.OpenSSH
462 $(INSTALL) -m 644 CREDITS $(DESTDIR)$(docdir)/CREDITS
258769aa 463
3c0ef626 464host-key: ssh-keygen$(EXEEXT)
e54b3d7c 465 @if [ -z "$(DESTDIR)" ] ; then \
3c0ef626 466 if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \
467 echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \
468 else \
469 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \
470 fi ; \
471 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
472 echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
473 else \
474 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \
475 fi ; \
476 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \
477 echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
478 else \
479 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \
480 fi ; \
481 fi ;
482
483host-key-force: ssh-keygen$(EXEEXT)
484 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
485 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
486 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
487
488uninstallall: uninstall
489 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
490 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
491 -rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
492 -rmdir $(DESTDIR)$(sysconfdir)
493 -rmdir $(DESTDIR)$(bindir)
494 -rmdir $(DESTDIR)$(sbindir)
495 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
496 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
497 -rmdir $(DESTDIR)$(mandir)
498 -rmdir $(DESTDIR)$(libexecdir)
499
416fd2a8 500uninstall:
3c0ef626 501 -rm -f $(DESTDIR)$(bindir)/slogin
79e66f07 502 -rm -f $(DESTDIR)$(bindir)/gsiscp
503 -rm -f $(DESTDIR)$(bindir)/gsissh
70791e56 504 -rm -f $(DESTDIR)$(bindir)/gsisftp
3c0ef626 505 -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
506 -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
507 -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
508 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
509 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
510 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
511 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
512 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
513 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
ff2d7a98 514 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
515 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
3c0ef626 516 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
517 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
79e66f07 518 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsissh.1
519 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsiscp.1
70791e56 520 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsisftp.1
3c0ef626 521 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
522 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
523 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
524 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
525 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
526 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
2980ea68 527 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
3c0ef626 528 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
ff2d7a98 529 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
3c0ef626 530 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
70791e56 531
532tests: $(TARGETS)
533 BUILDDIR=`pwd`; \
534 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \
535 [ -f `pwd`/regress/Makefile ] || \
34fee935 536 ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile ; \
1b56ff3d 537 TEST_SHELL="@TEST_SHELL@"; \
70791e56 538 TEST_SSH_SSH="$${BUILDDIR}/ssh"; \
539 TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \
540 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
541 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \
542 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \
543 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \
544 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \
545 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \
546 cd $(srcdir)/regress || exit $$?; \
547 $(MAKE) \
548 .OBJDIR="$${BUILDDIR}/regress" \
549 .CURDIR="`pwd`" \
550 BUILDDIR="$${BUILDDIR}" \
551 OBJ="$${BUILDDIR}/regress/" \
552 PATH="$${BUILDDIR}:$${PATH}" \
416fd2a8 553 TEST_SHELL="$${TEST_SHELL}" \
70791e56 554 TEST_SSH_SSH="$${TEST_SSH_SSH}" \
555 TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \
556 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \
557 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \
558 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \
559 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
560 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
561 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
562 EXEEXT="$(EXEEXT)" \
563 $@
564
2e437378 565compat-tests: $(LIBCOMPAT)
566 (cd openbsd-compat/regress && $(MAKE))
567
70791e56 568regressclean:
34fee935 569 if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \
70791e56 570 (cd regress && $(MAKE) clean) \
571 fi
1b56ff3d 572
34fee935 573survey: survey.sh ssh
574 @$(SHELL) ./survey.sh > survey
575 @echo 'The survey results have been placed in the file "survey" in the'
576 @echo 'current directory. Please review the file then send with'
577 @echo '"make send-survey".'
578
579send-survey: survey
580 mail portable-survey@mindrot.org <survey
581
1b56ff3d 582package: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS)
583 if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \
584 sh buildpkg.sh; \
585 fi
586
This page took 0.177726 seconds and 5 git commands to generate.