]> andersk Git - openssh.git/blame - Makefile.in
- Added 'DESTDIR' option to Makefile to ease package building. Patch from
[openssh.git] / Makefile.in
CommitLineData
5881cd60 1prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
42b89914 5libexecdir=@libexecdir@
bb0dd7f6 6mandir=@mandir@
c54a6257 7mansubdir=@mansubdir@
af381f02 8sysconfdir=@sysconfdir@
19d9ac2a 9piddir=@piddir@
10srcdir=@srcdir@
11top_srcdir=@top_srcdir@
5881cd60 12
ff8ecdb8 13DESTDIR=
14
d2dcff5f 15VPATH=@srcdir@
16
d4f11b59 17SSH_PROGRAM=@bindir@/ssh
bc7ea646 18ASKPASS_LOCATION=@libexecdir@/ssh
19ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass
d4f11b59 20
5881cd60 21CC=@CC@
db28aeb5 22PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
d4f11b59 23CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
6a0aeebc 24EXTRA_TARGETS=@GNOME_ASKPASS@
17f0f4a7 25LIBS=@LIBS@
5881cd60 26AR=@AR@
27RANLIB=@RANLIB@
cf8dd513 28INSTALL=@INSTALL@
a0f84251 29PERL=@PERL@
6cfb695b 30LDFLAGS=-L. @LDFLAGS@
5881cd60 31
17f0f4a7 32GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
33GNOME_LIBS=`gnome-config --libs gnome gnomeui`
34
48e671d5 35TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
36
37LIBOBJS= atomicio.o authfd.o authfile.o bsd-bindresvport.o bsd-daemon.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o fake-getaddrinfo.o fake-getnameinfo.o fingerprint.o hostfile.o log.o match.o mpaux.o nchan.o packet.o radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o
6cfb695b 38
a5c9cd31 39SSHOBJS= ssh.o sshconnect.o log-client.o readconf.o clientloop.o
40
48e671d5 41SSHDOBJS= sshd.o auth-rhosts.o auth-krb4.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o md5crypt.o
a5c9cd31 42
c54a6257 43TROFFMAN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8
44CATMAN = scp.0 ssh-add.0 ssh-agent.0 ssh-keygen.0 ssh.0 sshd.0
45MANPAGES = @MANTYPE@
a1ec4d79 46
47CONFIGFILES=sshd_config ssh_config
48
7e31dc81 49PATHSUBS = -D/etc/ssh_config=$(sysconfdir)/ssh_config -D/etc/known_hosts=$(sysconfdir)/ssh_known_hosts -D/etc/sshd_config=$(sysconfdir)/sshd_config -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key -D/var/run/sshd.pid=$(piddir)/sshd.pid
5f4fdfae 50
51FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
52
48e671d5 53all: $(TARGETS) $(MANPAGES) $(CONFIGFILES)
6cfb695b 54
f74efc8d 55$(LIBOBJS): config.h
56
6cfb695b 57libssh.a: $(LIBOBJS)
58 $(AR) rv $@ $(LIBOBJS)
5881cd60 59 $(RANLIB) $@
60
48e671d5 61ssh: libssh.a $(SSHOBJS)
a5c9cd31 62 $(CC) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh $(LIBS)
5881cd60 63
48e671d5 64sshd: libssh.a $(SSHDOBJS)
dfb95100 65 $(CC) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh $(LIBS)
5881cd60 66
48e671d5 67scp: libssh.a scp.o
6cfb695b 68 $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS)
5881cd60 69
48e671d5 70ssh-add: libssh.a ssh-add.o log-client.o
6cfb695b 71 $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS)
5881cd60 72
48e671d5 73ssh-agent: libssh.a ssh-agent.o log-client.o
6cfb695b 74 $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS)
5881cd60 75
48e671d5 76ssh-keygen: libssh.a ssh-keygen.o log-client.o
6cfb695b 77 $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS)
5881cd60 78
17f0f4a7 79gnome-ssh-askpass: gnome-ssh-askpass.c
80 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
81
5f4fdfae 82$(MANPAGES) $(CONFIGFILES)::
83 $(FIXPATHSCMD) $(srcdir)/$@
e1a9c08d 84
48e671d5 85clean:
86 rm -f *.o *.a $(TARGETS) config.status config.cache config.log
5f4fdfae 87 rm -f *.out core
48e671d5 88
89distclean: clean
90 rm -f Makefile config.h core *~
91
92mrproper: distclean
93
94veryclean: distclean
c54a6257 95 rm -f configure config.h.in *.0
96
97catman-do:
98 @for f in $(TROFFMAN) ; do \
99 echo "$$f -> $${f%%.[18]}.0" ; \
100 nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \
101 >$${f%%.[18]}.0 ; \
102 done
48e671d5 103
a1ec4d79 104install: $(TARGETS)
ff8ecdb8 105 $(INSTALL) -d $(DESTDIR)$(bindir)
106 $(INSTALL) -d $(DESTDIR)$(sbindir)
107 $(INSTALL) -d $(DESTDIR)$(mandir)
108 $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)1
109 $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)8
110 $(INSTALL) -s ssh $(DESTDIR)$(bindir)/ssh
111 $(INSTALL) -s scp $(DESTDIR)$(bindir)/scp
112 $(INSTALL) -s ssh-add $(DESTDIR)$(bindir)/ssh-add
113 $(INSTALL) -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent
114 $(INSTALL) -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
115 $(INSTALL) -s sshd $(DESTDIR)$(sbindir)/sshd
116 $(INSTALL) -m 644 ssh.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
117 $(INSTALL) -m 644 scp.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
118 $(INSTALL) -m 644 ssh-add.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
119 $(INSTALL) -m 644 ssh-agent.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
120 $(INSTALL) -m 644 ssh-keygen.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
121 $(INSTALL) -m 644 sshd.[08].out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
122 -rm -f $(DESTDIR)$(bindir)/slogin
123 ln -s ssh $(DESTDIR)$(bindir)/slogin
124 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
125 ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
045672f9 126
a2b62424 127 if [ ! -z "@GNOME_ASKPASS@" ] ; then \
ff8ecdb8 128 $(INSTALL) -d $(DESTDIR)$(libexecdir) ; \
129 $(INSTALL) -d $(DESTDIR)$(libexecdir)/ssh ; \
130 $(INSTALL) -s @GNOME_ASKPASS@ $(DESTDIR)${ASKPASS_LOCATION} ; \
045672f9 131 fi
5881cd60 132
ff8ecdb8 133 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
134 $(INSTALL) -d $(DESTDIR)$(sysconfdir); \
135 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
136 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
af381f02 137 fi
138
8946db53 139uninstallall: uninstall
ff8ecdb8 140 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
141 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
142 -rmdir $(DESTDIR)$(sysconfdir)
143 -rmdir $(DESTDIR)$(bindir)
144 -rmdir $(DESTDIR)$(sbindir)
145 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
146 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
147 -rmdir $(DESTDIR)$(mandir)
148 -rmdir $(DESTDIR)$(libexecdir)
8946db53 149
150uninstall:
ff8ecdb8 151 -rm -f $(DESTDIR)$(bindir)/ssh
152 -rm -f $(DESTDIR)$(bindir)/scp
153 -rm -f $(DESTDIR)$(bindir)/ssh-add
154 -rm -f $(DESTDIR)$(bindir)/ssh-agent
155 -rm -f $(DESTDIR)$(bindir)/ssh-keygen
156 -rm -f $(DESTDIR)$(sbindir)/sshd
157 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
158 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
159 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
160 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
161 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
162 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
163 -rm -f $(DESTDIR)$(bindir)/slogin
164 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
165 -rm -f $(DESTDIR)${ASKPASS_PROGRAM}
166 -rmdir $(DESTDIR)$(libexecdir)/ssh ;
This page took 0.095649 seconds and 5 git commands to generate.